summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_main.cpp
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2023-05-09 02:19:49 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-10 00:07:49 +0000
commit21a479cd5b0cf16449eeaa31781397c8cc838a41 (patch)
tree24a7a5e0fda2acffcb389a2d79dff2de3abca8d4 /src/mongo/db/mongod_main.cpp
parent2f82a21a99667c68bcb400bc6c468ed1f5e33dff (diff)
downloadmongo-21a479cd5b0cf16449eeaa31781397c8cc838a41.tar.gz
SERVER-76923 Allow bypassing checks for untimestamped writes as standalone
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r--src/mongo/db/mongod_main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index 1b1ca4c3182..979085513fe 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -821,6 +821,17 @@ ExitCode _initAndListen(ServiceContext* serviceContext, int listenPort) {
"maintenance and no other clients are connected. The TTL collection monitor will "
"not start because of this. For more info see "
"http://dochub.mongodb.org/core/ttlcollections");
+
+ if (gAllowUnsafeUntimestampedWrites &&
+ !repl::ReplSettings::shouldRecoverFromOplogAsStandalone()) {
+ LOGV2_WARNING_OPTIONS(
+ 7692300,
+ {logv2::LogTag::kStartupWarnings},
+ "Replica set member is in standalone mode. Performing any writes will result "
+ "in them being untimestamped. If a write is to an existing document, the "
+ "document's history will be overwritten with the new value since the beginning "
+ "of time. This can break snapshot isolation within the storage engine.");
+ }
} else {
startTTLMonitor(serviceContext);
}