-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
Fully Compatible
-
Repl 2023-10-16
Currently, for batch writes, if we see a targeting error in a transaction, we abort the whole batch, and additionally if the error is a transient transaction error then we return it directly to the user: https://github.com/mongodb/mongo/blob/b8f2f954dd79b3734f789fb971c03d156658311d/src/mongo/s/write_ops/batch_write_exec.cpp#L655-L667
But we don't do this for bulkWrite right now.
We should add logic similar to batchWrite to abort execution when we get a targeting error in a transaction, and additionally to return any targeting error that is a transient transaction error as a top-level error.