-
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
When looking up a key, print if it's a multi-part list and its splits. #3311
Conversation
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 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
Got comments. Address those before merging.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @martinmr)
dgraph/cmd/debug/run.go, line 448 at r1 (raw file):
isMultiPart := pl.IsMultiPart() fmt.Fprintf(&buf, " Is multipart list?: %v\n", isMultiPart)
Not both question mark and colon.
dgraph/cmd/debug/run.go, line 450 at r1 (raw file):
fmt.Fprintf(&buf, " Is multipart list?: %v\n", isMultiPart) if isMultiPart { fmt.Fprintf(&buf, " Start UIDs of each part: %v\n", pl.PartSplits())
"Start UID for part: %d\n"
posting/list.go, line 1324 at r1 (raw file):
// IsMultiPart returns true if the list has been split into multiple parts. func (l *List) IsMultiPart() bool {
Do you need this bool? The PartSplits can just deal with this already.
posting/list.go, line 1332 at r1 (raw file):
func (l *List) PartSplits() []uint64 { if len(l.plist.Splits) == 0 { return nil
Not sure why this if is relevant. In fact, you might want to do a slice copy 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, 5 unresolved discussions (waiting on @martinmr)
posting/list.go, line 1329 at r1 (raw file):
// PartSplits returns an empty array if the list has not been split into multiple parts. // Otherwise, it returns an array containing the start UID of each part.
nit: extra space
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, 4 unresolved discussions (waiting on @manishrjain)
dgraph/cmd/debug/run.go, line 448 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Not both question mark and colon.
Done.
dgraph/cmd/debug/run.go, line 450 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
"Start UID for part: %d\n"
Done.
posting/list.go, line 1324 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Do you need this bool? The PartSplits can just deal with this already.
Done.
posting/list.go, line 1332 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Not sure why this if is relevant. In fact, you might want to do a slice copy instead.
Done.
This change is