Skip to content

Commit

Permalink
storage: Don't process uninitialized replicas in the queue
Browse files Browse the repository at this point in the history
  • Loading branch information
a-robinson committed Mar 22, 2017
1 parent c1c55b1 commit c8b74d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/storage/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@ func (bq *baseQueue) processReplica(
log.Infof(ctx, "processing replica")
}

if !repl.IsInitialized() {
// We checked this when adding the replica, but we need to check it again
// in case this is a different replica with the same range ID (see #14193).
return errors.New("cannot process uninitialized replica")
}

if err := repl.IsDestroyed(); err != nil {
if log.V(3) {
log.Infof(queueCtx, "replica destroyed (%s); skipping", err)
Expand Down

0 comments on commit c8b74d8

Please sign in to comment.