The batch write path on mongos has this log line at level 4, that will log the batched command response from a shard if the dispatch was successful. This involves calling BatchedCommandResponse::toBSON, which uasserts the response's top-level status is OK. Any exception thrown by MongoD when running the batch write results in a command response with a top-level error, which fails this uassert on MongoS, early exiting the batch write path and then failingĀ this invariant in the BatchWriteOp destructor that all tracked writes have been cleared.
Notably, any error in a batch write in a transaction is thrown by MongoD, which would trigger this.
- duplicates
-
SERVER-39836 Allow updates to shard key value if the doc changes shards if the update is part of a multi-stmt txn
- Closed