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

Avoid panic in handleValuePostings #5652

Merged
merged 3 commits into from
Jun 17, 2020
Merged

Conversation

ashish-goswami
Copy link
Contributor

@ashish-goswami ashish-goswami commented Jun 15, 2020

Fixes: DGRAPH-1608

srcFn.n should be equal to len(q.UidList.Uids) for implementation DivideAndRule and
calculate to work correctly. But we have seen some panics while forming DataKey in
calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
reproduce this but couldn't find any edge case which will result in this panic. So for now
we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
happens.


This change is Reviewable

Copy link
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ashish-goswami, @manishrjain, and @vvbalaji-dgraph)


worker/task.go, line 365 at r1 (raw file):

Quoted 4 lines of code…
	// calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
	// reproduce this but couldn't find any edge case which will result in this panic. So for now
	// we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
	// happens.

shorten this comment, you don't need the last part.

Copy link
Contributor Author

@ashish-goswami ashish-goswami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @martinmr, and @vvbalaji-dgraph)


worker/task.go, line 365 at r1 (raw file):

Previously, martinmr (Martin Martinez Rivera) wrote…
	// calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
	// reproduce this but couldn't find any edge case which will result in this panic. So for now
	// we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
	// happens.

shorten this comment, you don't need the last part.

Done.

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @martinmr, and @vvbalaji-dgraph)

@ashish-goswami ashish-goswami merged commit 2184268 into master Jun 17, 2020
@ashish-goswami ashish-goswami deleted the ashish/handlevalue branch June 17, 2020 05:24
ashish-goswami added a commit that referenced this pull request Jun 18, 2020
Fixes: DGRAPH-1608

srcFn.n should be equal to len(q.UidList.Uids) for implementation DivideAndRule and
calculate to work correctly. But we have seen some panics while forming DataKey in
calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
reproduce this but couldn't find any edge case which will result in this panic. So for now
we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
happens.

(cherry picked from commit 2184268)
danielmai pushed a commit that referenced this pull request Jun 18, 2020
Fixes: DGRAPH-1608

srcFn.n should be equal to len(q.UidList.Uids) for implementation DivideAndRule and
calculate to work correctly. But we have seen some panics while forming DataKey in
calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
reproduce this but couldn't find any edge case which will result in this panic. So for now
we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
happens.

(cherry picked from commit 2184268)
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
Fixes: DGRAPH-1608

srcFn.n should be equal to len(q.UidList.Uids) for implementation DivideAndRule and
calculate to work correctly. But we have seen some panics while forming DataKey in
calculate(). panic is of the form "index out of range [4] with length 1". We have tried to
reproduce this but couldn't find any edge case which will result in this panic. So for now
we are just logging when srcFn.n != len(q.UidList.Uids) and returning error when this
happens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants