-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce DropPrefix API into Dgraph #3060
Conversation
DeleteAll logic now just calls DropAll. The logic in draft.go takes care of readding the reserved predicates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 16 of 17 files at r1, 23 of 23 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)
dgraph/cmd/zero/oracle.go, line 63 at r2 (raw file):
o.subscribers = make(map[int]chan *pb.OracleDelta) o.updates = make(chan *pb.OracleDelta, 100000) // Keeping 1 second worth of updates. o.doneUntil.Init(y.NewCloser(0))
Can you add a comment about why y.NewCloser(0) makes sense here. How about passing a nil instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @manishrjain)
dgraph/cmd/zero/oracle.go, line 63 at r2 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Can you add a comment about why y.NewCloser(0) makes sense here. How about passing a nil instead?
I created dgraph-io/badger#726 to support passing nil to this function. Once it's merged to master I'll update the vendor directory and change this to nil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 36 of 199 files reviewed, 3 unresolved discussions (waiting on @manishrjain and @martinmr)
query/query4_test.go, line 93 at r2 (raw file):
setSchema(s1) triples := ` <666> <numerology> "This number is evil" .
minor: can we also use hexadecimal numbers here to match the numbers used for verification below?
query/query4_test.go, line 136 at r2 (raw file):
s1 := testSchema + "\n child_pred: uid @reverse .\n" setSchema(s1) triples := `<666> <child_pred> <777> .`
switch to hexadecimal numbers?
6222417
to
37f8e1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 36 of 40 files reviewed, 3 unresolved discussions (waiting on @manishrjain and @martinmr)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 35 of 40 files reviewed, 2 unresolved discussions (waiting on @gitlw and @manishrjain)
query/query4_test.go, line 93 at r2 (raw file):
Previously, gitlw (Lucas Wang) wrote…
minor: can we also use hexadecimal numbers here to match the numbers used for verification below?
Done.
query/query4_test.go, line 136 at r2 (raw file):
Previously, gitlw (Lucas Wang) wrote…
switch to hexadecimal numbers?
Done.
* Introduce Badger's new DropPrefix API into Dgraph * Simplify DeleteAll logic. DeleteAll logic now just calls DropAll. The logic in draft.go takes care of readding the reserved predicates.
This change is