You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TN recovery can use incomplete participant routes and block shutdown #25951
TN recovery can use incomplete participant routes and can remain blocked after cancellation.
This is independently reproducible on current main at 3046f14d94b3f1a25839eeeb65729b64f85ac647.
Failure 1: recovered 2PC metadata has no live route
A recovered prepared transaction can contain only the durable participant identity (ShardID). The recovery coordinator currently sends GetStatus immediately with that incomplete shard metadata. The observed target is:
<ShardID:2, ReplicaID:0, Address:"">
Recovery should complete each participant's current ReplicaID and transaction service address from the TN cluster snapshot before sending status or commit requests. If the participant is temporarily absent, recovery should wait and retry rather than send to an empty route.
Failure 2: storage recovery ignores cancellation while publishing
KVTxnStorage.StartRecovery publishes recovered transactions with an unconditional channel send. With 17 records and the service's 16-entry recovery channel left full, canceling the supplied context does not terminate the producer.
recovery remained blocked on a full transaction channel after cancellation
This also means TN shutdown cannot safely cancel a service whose Start() is waiting for recovery to finish.
Expected invariant
Prepared/committing recovery requests use a complete current TN participant route.
A temporarily missing participant or transient cluster lookup is retried.
Canceling recovery terminates route waits, storage producers, the recovery consumer, and the blocked TxnService.Start() path.
Repeated close and partial-start cleanup remain safe.
Scope
This issue is limited to generic transaction recovery routing and cancellation. It does not include AUTO_INCREMENT semantics, allocator changes, or 2PC replay ordering/timestamp behavior.
Closed by #25956, merged as bbca3f3.\n\nThe merged change covers the full scope of this issue:\n- recovered coordinator transactions resolve complete current TN participant routes before recovery RPCs;\n- missing or transient routes are retried from an authoritative cluster snapshot;\n- cancellation terminates route waits, MEMKV reads/publication, the recovery consumer, blocked TxnService.Start, late replica generations, and cluster-readiness waits;\n- repeated close and partial-start shutdown paths have regression coverage.\n\nThe PR's required CI and post-merge TKE check-in completed successfully. The failing merge-update-moc check is a post-merge synchronization workflow and is not an implementation-validation failure.\n\nThe remaining 2PC replay/timestamp and AUTO_INCREMENT work is intentionally outside #25951 and will continue in separate prerequisite PRs.
Activity
fix(txn): restore recovery routes and cancellation (#25956)
VioletQwQ-0 commentedon Jul 22, 2026
Closed by #25956, merged as bbca3f3.\n\nThe merged change covers the full scope of this issue:\n- recovered coordinator transactions resolve complete current TN participant routes before recovery RPCs;\n- missing or transient routes are retried from an authoritative cluster snapshot;\n- cancellation terminates route waits, MEMKV reads/publication, the recovery consumer, blocked TxnService.Start, late replica generations, and cluster-readiness waits;\n- repeated close and partial-start shutdown paths have regression coverage.\n\nThe PR's required CI and post-merge TKE check-in completed successfully. The failing merge-update-moc check is a post-merge synchronization workflow and is not an implementation-validation failure.\n\nThe remaining 2PC replay/timestamp and AUTO_INCREMENT work is intentionally outside #25951 and will continue in separate prerequisite PRs.
fix(txn): restore recovery routes and cancellation (matrixorigin#25956)
fix(txn): restore recovery routes and cancellation (matrixorigin#25956)
fix(txn): restore recovery routes and cancellation (matrixorigin#25956)