summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2020-04-22 14:03:49 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-27 20:13:41 +0000
commit147beeb42b443c016615d6b101e0cd54b4d618bc (patch)
tree927c19cd6d43310296006f856dea3382e9ae7326 /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
parenta30cef00b9e3ccfe60a4dce7f9f2c7cbaf1e68b7 (diff)
downloadmongo-147beeb42b443c016615d6b101e0cd54b4d618bc.tar.gz
SERVER-46714 Only perform EMRC=false shutdown handling when EMRC=false
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index 4fdcd891992..1741ebf601c 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -998,12 +998,13 @@ void WiredTigerKVEngine::cleanShutdown() {
const Timestamp stableTimestamp = getStableTimestamp();
const Timestamp initialDataTimestamp = getInitialDataTimestamp();
- if (stableTimestamp >= initialDataTimestamp) {
+ if (serverGlobalParams.enableMajorityReadConcern || stableTimestamp >= initialDataTimestamp) {
invariantWTOK(_conn->close(_conn, closeConfig.c_str()));
} else {
+ // See SERVER-45010 for why this quickExit is necessary.
LOGV2(22326,
- "Skipping checkpoint during clean shutdown because stableTimestamp "
- "({stableTimestamp}) is less than the initialDataTimestamp ({initialDataTimestamp})",
+ "Skipping checkpoint during clean shutdown because stableTimestamp is less than the "
+ "initialDataTimestamp and enableMajorityReadConcern is false",
"stableTimestamp"_attr = stableTimestamp,
"initialDataTimestamp"_attr = initialDataTimestamp);
quickExit(EXIT_SUCCESS);