-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
Inside the TransactionRouter, there are two different behaviors for retrying stale exceptions: canContinueOnStaleShardOrDbError and isSafeToRetryStaleErrors.
Both methods have subtle differences:
- canContinueOnStaleShardOrDbError → Returns true if there is at least one participant and the stale exception occurred in the first statement of the transaction. This is only used for routers (both standard and embedded routers).
- isSafeToRetryStaleErrors → Returns true if the transaction router has not acted as a sub-router. This is only used for shards (either running with an embedded router or acting in the router role). This was recently introduced by
SERVER-93430.
The purpose of this ticket is to investigate the reasoning behind these differences and determine whether it is possible to unify both methods into one.
- related to
-
SERVER-93430 Collection and database routers should not retry if shard acted as a sub router
-
- Closed
-