summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2019-04-09 09:58:50 -0400
committerBlake Oler <blake.oler@mongodb.com>2019-06-04 14:32:31 -0400
commitdb3c76679b7a3d9b443a0e1b3e45ed02b88c539f (patch)
tree15124ec7194bad6cb30c0a280ed233813e3a0647
parent0c2e3a6b1ea226c9dfb9822b57f02399950493dc (diff)
downloadmongo-r3.6.13.tar.gz
SERVER-40052 Remove unnecessary invariant in BatchWriteOp invariantr3.6.13-rc1r3.6.13
(cherry picked from commit da806668926bcbdddbdc3d1aa86216810e4041d5)
-rw-r--r--src/mongo/s/write_ops/batch_write_op.cpp5
-rw-r--r--src/mongo/s/write_ops/batch_write_op.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/mongo/s/write_ops/batch_write_op.cpp b/src/mongo/s/write_ops/batch_write_op.cpp
index ea46c31ff6c..752bbee8ec9 100644
--- a/src/mongo/s/write_ops/batch_write_op.cpp
+++ b/src/mongo/s/write_ops/batch_write_op.cpp
@@ -212,11 +212,6 @@ BatchWriteOp::BatchWriteOp(OperationContext* opCtx, const BatchedCommandRequest&
}
}
-BatchWriteOp::~BatchWriteOp() {
- // Caller's responsibility to dispose of TargetedBatches
- invariant(_targeted.empty());
-}
-
Status BatchWriteOp::targetBatch(const NSTargeter& targeter,
bool recordTargetErrors,
std::map<ShardId, TargetedWriteBatch*>* targetedBatches) {
diff --git a/src/mongo/s/write_ops/batch_write_op.h b/src/mongo/s/write_ops/batch_write_op.h
index 1398096ded6..a5eec12d6c7 100644
--- a/src/mongo/s/write_ops/batch_write_op.h
+++ b/src/mongo/s/write_ops/batch_write_op.h
@@ -121,7 +121,7 @@ class BatchWriteOp {
public:
BatchWriteOp(OperationContext* opCtx, const BatchedCommandRequest& clientRequest);
- ~BatchWriteOp();
+ ~BatchWriteOp() = default;
/**
* Targets one or more of the next write ops in this batch op using a NSTargeter. The