Skip to content

Commit

Permalink
After winning a campaign, the call to waitDeletes was missing a
Browse files Browse the repository at this point in the history
slash after the key prefix. The result was deadlock due to
waiting on wrong keys.

Fixes #6278
  • Loading branch information
glycerine committed Aug 28, 2016
1 parent c388b2f commit ed3ef72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clientv3/concurrency/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (e *Election) Campaign(ctx context.Context, val string) error {
}
}

err = waitDeletes(ctx, client, e.keyPrefix, v3.WithPrefix(), v3.WithRev(e.leaderRev-1))
err = waitDeletes(ctx, client, e.keyPrefix+"/", v3.WithPrefix(), v3.WithRev(e.leaderRev-1))
if err != nil {
// clean up in case of context cancel
select {
Expand Down

0 comments on commit ed3ef72

Please sign in to comment.