From 64a9438f7b7d12516c0d6f2af3d2db2d39ce0db1 Mon Sep 17 00:00:00 2001 From: Martin Martinez Rivera Date: Tue, 16 Jun 2020 12:51:52 -0700 Subject: [PATCH] Only process restore request in the current alpha if it's the leader. (#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. --- worker/online_restore_ee.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/online_restore_ee.go b/worker/online_restore_ee.go index a51d07ea0a0..7cafd4e09d0 100644 --- a/worker/online_restore_ee.go +++ b/worker/online_restore_ee.go @@ -83,7 +83,7 @@ func ProcessRestoreRequest(ctx context.Context, req *pb.RestoreRequest) error { } func proposeRestoreOrSend(ctx context.Context, req *pb.RestoreRequest) error { - if groups().ServesGroup(req.GetGroupId()) { + if groups().ServesGroup(req.GetGroupId()) && groups().Node.AmLeader() { _, err := (&grpcWorker{}).Restore(ctx, req) return err }