Skip to content

Commit

Permalink
Merge #40455
Browse files Browse the repository at this point in the history
40455: storage: fix safe explanation of merge lock failure r=nvanbenschoten a=nvanbenschoten

Saw in #38772 (comment).

Release note: None

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
  • Loading branch information
craig[bot] and nvanbenschoten committed Sep 4, 2019
2 parents 58d0fc3 + 4041935 commit 95423be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/storage/replica_application_state_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ func (b *replicaAppBatch) Stage(cmdI apply.Command) (apply.CheckedCommand, error
// command was rejected with a below-Raft forced error then its replicated
// result was just cleared and this will be a no-op.
if splitMergeUnlock, err := b.r.maybeAcquireSplitMergeLock(ctx, cmd.raftCmd); err != nil {
return nil, wrapWithNonDeterministicFailure(err, "unable to acquire split lock")
kind := "merge"
if cmd.raftCmd.ReplicatedEvalResult.Split != nil {
kind = "split"
}
return nil, wrapWithNonDeterministicFailure(err, "unable to acquire "+kind+" lock")
} else if splitMergeUnlock != nil {
// Set the splitMergeUnlock on the replicaAppBatch to be called
// after the batch has been applied (see replicaAppBatch.commit).
Expand Down

0 comments on commit 95423be

Please sign in to comment.