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

Fix tablet error handling. #3323

Merged
merged 6 commits into from
Apr 26, 2019
Merged

Fix tablet error handling. #3323

merged 6 commits into from
Apr 26, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Apr 25, 2019

Currently errUnservedTablet is being returned when there's an issue with
the tablets. However, there are actually two types of errors that should
be handled differently.

  1. Predicate has not been seen yet so the tablet group id is zero.
  2. The group id of the tablet is > 0 but it differs from the id of the
    current group.

This change fixes the error handling. The error in the move-tablet jepsen
test is fixed by it.


This change is Reviewable

Currently errUnservedTablet is being returned when there's an issue with
the tablets. However, there are actually two types of errors that should
be handled differently.

1. Predicate has not been seen yet so the tablet group id is zero.
2. The group id of the tablet is > 0 but it differs from the id of the
current group.

This change fixes the error handling. The error running in the
move-tablet jepsen test is fixed by it.
@martinmr martinmr requested review from manishrjain and a team as code owners April 25, 2019 22:59
Copy link
Contributor

@manishrjain manishrjain 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 7 of 7 files at r1.
Reviewable status: 2 of 7 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)


worker/mutation.go, line 44 at r1 (raw file):

	ErrNonExistentTabletMessage = "Requested predicate is not being served by any tablet"
	errUnservedTablet           = x.Errorf("Tablet isn't being served by this instance")
	errNonexistentTablet        = x.Errorf(ErrNonExistentTabletMessage)

Move this up to be placed right below the message.

Copy link
Contributor Author

@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.

Reviewable status: 2 of 7 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


worker/mutation.go, line 44 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Move this up to be placed right below the message.

Done.

@martinmr martinmr merged commit eb0a4c4 into master Apr 26, 2019
@martinmr martinmr deleted the martinmr/tablet-error-handling branch April 26, 2019 00:14
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
Currently errUnservedTablet is being returned when there's an issue with
the tablets. However, there are actually two types of errors that should
be handled differently.

1. Predicate has not been seen yet so the tablet group id is zero.
2. The group id of the tablet is > 0 but it differs from the id of the
current group.

This change fixes the error handling. The error running in the
move-tablet jepsen test is fixed by it.
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.

2 participants