Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Sharding
-
Fully Compatible
-
Repl 2023-10-16, Repl 2023-10-30
Description
BatchWriteOp has a _targeted member that is stated to be for tracking purposes: https://github.com/mongodb/mongo/blob/7f42924bf009ec67df3b2d8e32d56bb387037c27/src/mongo/s/write_ops/batch_write_op.h#L237C1-L237C1
However, as far as I can tell we never actually write to or store anything in _targeted and we never actually read anything in it.
The only references appear to be:
- in the method forgetTargetedBatchesOnTransactionAbortingError we clear it. this is called from a few places
- we attempt to remove a batch from it in BatchWriteOp::noteBatchResponse
Given this it seems like dead code, so unless if it is a bug that we don't write to or read from it, we should remove it.