Skip to content

Commit de735d7

Browse files
committed
kvclient/kvcoord: remove stale TODO in Step
We currently have a TODO in Step to add an assertion that stepping is only done on the RootTxn which references a now-closed issue. I did a little bit archeology, and in bd255e5 we consciously removed the assertion like this since stepping on a LeafTxn should be no-op, should just work, and is actually needed behavior for internal executors when they run on remote nodes as part of DistSQL plan. (In connExecutor we currently unconditionally Step the txn on the main query path.) Thus I don't think we want to implement the TODO and should just remove it. Release note: None
1 parent 40c6169 commit de735d7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pkg/kv/kvclient/kvcoord/txn_coord_sender.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,11 +1525,6 @@ func (tc *TxnCoordSender) TestingCloneTxn() *roachpb.Transaction {
15251525

15261526
// Step is part of the TxnSender interface.
15271527
func (tc *TxnCoordSender) Step(ctx context.Context, allowReadTimestampStep bool) error {
1528-
// TODO(nvanbenschoten): it should be possible to make this assertion, but
1529-
// the API is currently misused by the connExecutor. See #86162.
1530-
// if tc.typ != kv.RootTxn {
1531-
// return errors.AssertionFailedf("cannot step in non-root txn")
1532-
// }
15331528
tc.mu.Lock()
15341529
defer tc.mu.Unlock()
15351530
if allowReadTimestampStep && tc.shouldStepReadTimestampLocked() {

0 commit comments

Comments
 (0)