diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-08-03 14:25:13 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-04 01:58:47 +0000 |
commit | 9102bf998537e744227fe2a28cb22838388bb3f6 (patch) | |
tree | ba5d31a3385522fc382a2704135fa7ec835222e2 /src/mongo/db/ops | |
parent | e07c2d29aded5a30ff08b5ce6a436b6ef6f44014 (diff) | |
download | mongo-9102bf998537e744227fe2a28cb22838388bb3f6.tar.gz |
SERVER-48312 Remove support for 'supportsDocLocking = false'
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r-- | src/mongo/db/ops/write_ops_exec.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp index 7fa9c49d362..d79fe941414 100644 --- a/src/mongo/db/ops/write_ops_exec.cpp +++ b/src/mongo/db/ops/write_ops_exec.cpp @@ -295,18 +295,16 @@ void insertDocuments(OperationContext* opCtx, // to be written. Multidocument transactions should not generate opTimes because they are // generated at the time of commit. auto batchSize = std::distance(begin, end); - if (supportsDocLocking()) { - auto replCoord = repl::ReplicationCoordinator::get(opCtx); - auto inTransaction = opCtx->inMultiDocumentTransaction(); - - if (!inTransaction && !replCoord->isOplogDisabledFor(opCtx, collection->ns())) { - // Populate 'slots' with new optimes for each insert. - // This also notifies the storage engine of each new timestamp. - auto oplogSlots = repl::getNextOpTimes(opCtx, batchSize); - auto slot = oplogSlots.begin(); - for (auto it = begin; it != end; it++) { - it->oplogSlot = *slot++; - } + auto replCoord = repl::ReplicationCoordinator::get(opCtx); + auto inTransaction = opCtx->inMultiDocumentTransaction(); + + if (!inTransaction && !replCoord->isOplogDisabledFor(opCtx, collection->ns())) { + // Populate 'slots' with new optimes for each insert. + // This also notifies the storage engine of each new timestamp. + auto oplogSlots = repl::getNextOpTimes(opCtx, batchSize); + auto slot = oplogSlots.begin(); + for (auto it = begin; it != end; it++) { + it->oplogSlot = *slot++; } } |