-
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
Only process restore request in the current alpha if it's the leader. #5657
Conversation
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.
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: 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.
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: 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.
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: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain, @parasssh, and @vvbalaji-dgraph)
…#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.
…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.
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