Skip to content

Commit

Permalink
storage: Fix buggy comparison of lastAddedTime in replicate queue
Browse files Browse the repository at this point in the history
Added by 54618ea. This is what I get
for testing out the initial version of the PR but not the final version.

Fixes cockroachdb#18456
  • Loading branch information
a-robinson committed Sep 12, 2017
1 parent 29c6854 commit 6b50176
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 6b50176

Please sign in to comment.