Each time we send a write command in a batch we must increment the value in its txnNumber field. I'd thought it was a good idea to keep a bson_iter_t permanently located at that field and use bson_iter_overwrite_int64 to increment the number, but something was wrong with that and it had to be reverted:
https://github.com/jmikola/mongo-c-driver/commit/c2dd0d4a5a69ef74adc01e2d3a0f879cf9c075f9
Investigate whether it's possible to avoid re-locating the txnNumber field for each command in the batch.
- is related to
-
CDRIVER-2228 All writes retryable support
- Closed
- related to
-
CDRIVER-2387 Optimize access for retryWrites URI option
- Backlog
-
CDRIVER-2386 Refactor findAndModify helper to use write_command_with_opts
- Closed