-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2025-03-17
-
0
-
2
The addShard path runs a transaction using the internal txn API. Previously, this txn was run with majority wc, so we'd wait for majority as part of the txn api execution path. If there was a failover when waiting, the txn api would return the stepdown/not primary error the thread was interrupted with. We recently changed the addShard path to run the txn with local wc, and then wait for majority using the waitForMajorityService. If there's a stepdown, the WaitForMajorityService will be killed when its cancellation token is cancelled by the stepdown thread - cancellation tokens are killed with the generic error CallbackCancelled, and the addShard path doesn't overwrite this error with the original error the thread was interrupted with.