-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2018-09-10, Sharding 2018-09-24, Sharding 2018-10-08
Mongos batches writes together and even if individual writes fail, the command response can return {ok: 1}. However, if any of the individual writes failed with an error label, that label will be lost.
The batch write path should be modified to preserve any error labels returned by writes in a batch.
This ticket includes determining how error labels encountered during batch writes should be handled, e.g. if two writes in an unordered batch fail but only one has the TransientTransactionError label, should the batch response include the label or not. Mongod addresses this by throwing if any statement in a batch fails within a transaction, so the solution may be adding this behavior to mongos.
This work was spun off fromĀ SERVER-35708.
- is depended on by
-
DRIVERS-522 Support mongos pinning for sharded transactions
- Development Complete
- is related to
-
SERVER-35708 mongos does not attach errorLabels on command response
- Closed
-
SERVER-34256 On error within a transaction, expose in response whether transaction can be safely retried from the beginning
- Closed