Skip to content

Commit

Permalink
kvserver: rename tryReproposeWithNewLeaseIndex{V2,}
Browse files Browse the repository at this point in the history
  • Loading branch information
tbg committed Jul 19, 2023
1 parent 3c12e0d commit f580049
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replica_application_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (d *replicaDecoder) decode(ctx context.Context, ents []raftpb.Entry) error
// with a proposal in that way are considered "local", meaning a client is
// waiting on their result, and may be reproposed (as a new proposal) with a new
// lease index in case they apply with an illegal lease index (see
// tryReproposeWithNewLeaseIndexV2).
// tryReproposeWithNewLeaseIndex).
func (d *replicaDecoder) retrieveLocalProposals() (anyLocal bool) {
d.r.mu.Lock()
defer d.r.mu.Unlock()
Expand Down
6 changes: 2 additions & 4 deletions pkg/kv/kvserver/replica_application_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (r *Replica) prepareLocalResult(ctx context.Context, cmd *replicatedCmd) {
}
}
if pErr == nil { // since we might have injected an error
pErr = kvpb.NewError(r.tryReproposeWithNewLeaseIndexV2(ctx, cmd))
pErr = kvpb.NewError(r.tryReproposeWithNewLeaseIndex(ctx, cmd))
if pErr == nil {
// Avoid falling through below. We managed to repropose, but this
// proposal is still erroring out. We don't want to assign to
Expand Down Expand Up @@ -273,9 +273,7 @@ func (r *Replica) prepareLocalResult(ctx context.Context, cmd *replicatedCmd) {
}
}

func (r *Replica) tryReproposeWithNewLeaseIndexV2(
ctx context.Context, origCmd *replicatedCmd,
) error {
func (r *Replica) tryReproposeWithNewLeaseIndex(ctx context.Context, origCmd *replicatedCmd) error {
// NB: `origCmd` remains "Local". It's just not going to signal anyone
// or release any latches.

Expand Down

0 comments on commit f580049

Please sign in to comment.