Skip to content

Commit

Permalink
Merge pull request #18465 from a-robinson/cherrypick_18463
Browse files Browse the repository at this point in the history
cherrypick-1.1: storage: Fix buggy comparison of lastAddedTime in replicate queue
  • Loading branch information
a-robinson authored Sep 13, 2017
2 parents 4a2ffb0 + aab0ccc commit d4a1198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/replicate_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (rq *replicateQueue) processOneChange(
case AllocatorRemove:
log.VEventf(ctx, 1, "removing a replica")
lastReplAdded, lastAddedTime := repl.LastReplicaAdded()
if timeutil.Since(lastAddedTime) < newReplicaGracePeriod {
if timeutil.Since(lastAddedTime) > newReplicaGracePeriod {
lastReplAdded = 0
}
candidates := filterUnremovableReplicas(repl.RaftStatus(), desc.Replicas, lastReplAdded)
Expand Down

0 comments on commit d4a1198

Please sign in to comment.