diff --git a/pkg/kv/kvserver/apply/task.go b/pkg/kv/kvserver/apply/task.go index c15dc31af9d6..76560969c0a9 100644 --- a/pkg/kv/kvserver/apply/task.go +++ b/pkg/kv/kvserver/apply/task.go @@ -272,8 +272,8 @@ func (t *Task) ApplyCommittedEntries(ctx context.Context) error { }); rejectErr != nil { return rejectErr } - return err } + return err } } iter.Close() diff --git a/pkg/kv/kvserver/replica_test.go b/pkg/kv/kvserver/replica_test.go index 0a8f12735726..8b7aac60d1c7 100644 --- a/pkg/kv/kvserver/replica_test.go +++ b/pkg/kv/kvserver/replica_test.go @@ -8123,14 +8123,6 @@ func TestReplicaRefreshMultiple(t *testing.T) { ba.Add(inc) ba.Timestamp = tc.Clock().Now() - st := repl.CurrentLeaseStatus(ctx) - proposal, pErr := repl.requestToProposal(ctx, incCmdID, ba, allSpansGuard(), &st, uncertainty.Interval{}) - if pErr != nil { - t.Fatal(pErr) - } - // Save this channel; it may get reset to nil before we read from it. - proposalDoneCh := proposal.doneCh - g, _, pErr := repl.concMgr.SequenceReq(ctx, nil /* guard */, concurrency.Request{ Txn: ba.Txn, Timestamp: ba.Timestamp, @@ -8144,6 +8136,14 @@ func TestReplicaRefreshMultiple(t *testing.T) { }, concurrency.PessimisticEval) require.NoError(t, pErr.GoError()) + st := repl.CurrentLeaseStatus(ctx) + proposal, pErr := repl.requestToProposal(ctx, incCmdID, ba, allSpansGuard(), &st, uncertainty.Interval{}) + if pErr != nil { + t.Fatal(pErr) + } + // Save this channel; it may get reset to nil before we read from it. + proposalDoneCh := proposal.doneCh + proposal.ec = endCmds{ repl: repl, g: g,