diff options
author | Josef Ahmad <josef.ahmad@mongodb.com> | 2022-03-29 19:41:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-29 20:52:12 +0000 |
commit | 541aee0462a9fdabb77cf9325d43cc3166685e67 (patch) | |
tree | f227f82e74533c9a90b521626eda0fdb531609ae /src/mongo/db/op_observer_impl.cpp | |
parent | 64627c72e1fd97e5aa4c1be7fe8473f01d71c047 (diff) | |
download | mongo-541aee0462a9fdabb77cf9325d43cc3166685e67.tar.gz |
SERVER-64927 Add batched deletes passthrough suites
Diffstat (limited to 'src/mongo/db/op_observer_impl.cpp')
-rw-r--r-- | src/mongo/db/op_observer_impl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index 098a7d55d16..37fc927add5 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -1981,6 +1981,10 @@ void OpObserverImpl::onBatchedWriteCommit(OperationContext* opCtx) { auto& batchedWriteContext = BatchedWriteContext::get(opCtx); auto& batchedOps = batchedWriteContext.getBatchedOperations(opCtx); + if (!batchedOps.size()) { + return; + } + // Reserve all the optimes in advance, so we only need to get the optime mutex once. We // reserve enough entries for all statements in the transaction. auto oplogSlots = repl::getNextOpTimes(opCtx, batchedOps.size()); |