Skip to content
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

Merged
merged 2 commits into from Apr 23, 2019

Conversation

@martinmr
Copy link
Member

commented Apr 23, 2019

This change is Reviewable

@martinmr martinmr requested a review from dgraph-io/team Apr 23, 2019
Copy link
Contributor

left a comment

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@martinmr martinmr requested a review from manishrjain Apr 23, 2019
Copy link
Member

left a comment

:lgtm: 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.

Copy link
Member

left a comment

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

Copy link
Member Author

left a comment

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.

@martinmr martinmr merged commit b1d750b into master Apr 23, 2019
4 of 5 checks passed
4 of 5 checks passed
code-review/reviewable 2 files, 4 discussions left (codexnull, manishrjain)
Details
Blockade (dgraph) TeamCity build finished
Details
CI (dgraph) TeamCity build finished
Details
GolangCI No issues found!
Details
license/cla Contributor License Agreement is signed.
Details
@martinmr martinmr deleted the martinmr/debug-startuid branch Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.