diff --git a/pkg/kv/kvclient/kvcoord/txn_interceptor_committer.go b/pkg/kv/kvclient/kvcoord/txn_interceptor_committer.go index a408f2438a4c..572217d6b4b7 100644 --- a/pkg/kv/kvclient/kvcoord/txn_interceptor_committer.go +++ b/pkg/kv/kvclient/kvcoord/txn_interceptor_committer.go @@ -452,7 +452,7 @@ func (tc *txnCommitter) retryTxnCommitAfterFailedParallelCommit( et := baSuffix.Requests[0].GetEndTxn().ShallowCopy().(*kvpb.EndTxnRequest) et.LockSpans, _ = mergeIntoSpans(et.LockSpans, et.InFlightWrites) et.InFlightWrites = nil - baSuffix.Requests[0].Value.(*kvpb.RequestUnion_EndTxn).EndTxn = et + baSuffix.Requests[0].MustSetInner(et) } brSuffix, pErr := tc.wrapped.SendLocked(ctx, baSuffix) if pErr != nil { diff --git a/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go b/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go index 64e19117c1b3..59b4443a52ac 100644 --- a/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go +++ b/pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go @@ -408,7 +408,7 @@ func (sr *txnSpanRefresher) splitEndTxnAndRetrySend( et = et.ShallowCopy().(*kvpb.EndTxnRequest) et.LockSpans, _ = mergeIntoSpans(et.LockSpans, et.InFlightWrites) et.InFlightWrites = nil - baSuffix.Requests[0].Value.(*kvpb.RequestUnion_EndTxn).EndTxn = et + baSuffix.Requests[0].MustSetInner(et) } brSuffix, pErr := sr.SendLocked(ctx, baSuffix) if pErr != nil {