summaryrefslogtreecommitdiff
path: root/src/mongo/s/write_ops/batch_write_op.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/write_ops/batch_write_op.h')
-rw-r--r--src/mongo/s/write_ops/batch_write_op.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/s/write_ops/batch_write_op.h b/src/mongo/s/write_ops/batch_write_op.h
index 6b1856e7a3d..13418231ea0 100644
--- a/src/mongo/s/write_ops/batch_write_op.h
+++ b/src/mongo/s/write_ops/batch_write_op.h
@@ -173,6 +173,13 @@ public:
void abortBatch(const WriteErrorDetail& error);
/**
+ * Disposes of all tracked targeted batches when an error is encountered during a transaction.
+ * This is safe because any partially written data on shards will be rolled back if mongos
+ * decides to abort.
+ */
+ void forgetTargetedBatchesOnTransactionAbortingError();
+
+ /**
* Returns false if the batch write op needs more processing.
*/
bool isFinished();