summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-08-03 14:25:13 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-04 01:58:47 +0000
commit9102bf998537e744227fe2a28cb22838388bb3f6 (patch)
treeba5d31a3385522fc382a2704135fa7ec835222e2 /src/mongo/db/ops
parente07c2d29aded5a30ff08b5ce6a436b6ef6f44014 (diff)
downloadmongo-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.cpp22
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++;
}
}