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

Only process restore request in the current alpha if it's the leader. #5657

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jun 15, 2020

Requests for other groups are being sent to the leader but the request
for the group the received the request might not be sent to the leader.
Fix that by first checking if the alpha is the leader. If not, the
request is sent to the leader.


This change is Reviewable

Requests for other groups are being sent to the leader but the request
for the group the received the request might not be sent to the leader.
Fix that by first checking if the alpha is the leader. If not, the
request is sent to the leader.
@martinmr martinmr requested a review from a team June 15, 2020 23:58
Copy link
Contributor

@parasssh parasssh 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/online_restore_ee.go, line 86 at r1 (raw file):

func proposeRestoreOrSend(ctx context.Context, req *pb.RestoreRequest) error {
	if groups().ServesGroup(req.GetGroupId()) && groups().Node.AmLeader() {

So, if this alpha is not the leader but it serves the group, the request is sent to the leader. But, wouldn't leader just error out saying it doesn't serve the group.

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: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @parasssh, and @vvbalaji-dgraph)


worker/online_restore_ee.go, line 86 at r1 (raw file):

Previously, parasssh wrote…

So, if this alpha is not the leader but it serves the group, the request is sent to the leader. But, wouldn't leader just error out saying it doesn't serve the group.

Done. The leader should be in the same group.

Copy link
Contributor

@parasssh parasssh 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, @parasssh, and @vvbalaji-dgraph)

@martinmr martinmr merged commit f40351e into master Jun 16, 2020
@martinmr martinmr deleted the martinmr/restore-leader branch June 16, 2020 19:51
martinmr added a commit that referenced this pull request Jun 18, 2020
…#5657)

Requests for other groups are being sent to the leader but the request
for the group the received the request might not be sent to the leader.
Fix that by first checking if the alpha is the leader. If not, the
request is sent to the leader.
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
…hypermodeinc#5657)

Requests for other groups are being sent to the leader but the request
for the group the received the request might not be sent to the leader.
Fix that by first checking if the alpha is the leader. If not, the
request is sent to the leader.
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