From 69c22b8078781e08dd9e97acd01047713710ba15 Mon Sep 17 00:00:00 2001 From: Pratyoy Mukhopadhyay <35388175+pmmukh@users.noreply.github.com> Date: Mon, 28 Feb 2022 10:38:34 -0800 Subject: [PATCH] Fix raft paralle retry bug (#14303) --- vault/raft.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vault/raft.go b/vault/raft.go index 7545bd42d..52b850a67 100644 --- a/vault/raft.go +++ b/vault/raft.go @@ -961,17 +961,17 @@ func (c *Core) JoinRaftCluster(ctx context.Context, leaderInfos []*raft.LeaderJo return err } var wg sync.WaitGroup - for i := range leaderInfos { + for i := range expandedJoinInfos { wg.Add(1) go func(joinInfo *raft.LeaderJoinInfo) { defer wg.Done() raftInfo, err := c.getRaftChallenge(joinInfo) if err != nil { - c.Logger().Trace("failed to get raft challenge", "leader_addr", joinInfo.LeaderAPIAddr, "error", err) + c.Logger().Error("failed to get raft challenge", "leader_addr", joinInfo.LeaderAPIAddr, "error", err) return } challengeCh <- raftInfo - }(leaderInfos[i]) + }(expandedJoinInfos[i]) } go func() { wg.Wait()