summaryrefslogtreecommitdiff
path: root/src/mongo/db/db.cpp
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2019-07-01 14:49:26 -0400
committerDianna Hohensee <dianna.hohensee@10gen.com>2019-07-01 21:28:57 -0400
commit164e785735f0fd8db2e0c68b86c2278ddc92a671 (patch)
tree3055b20b0e90aecc3003cb276cbf0350d8ab5ef8 /src/mongo/db/db.cpp
parentb9198150102c2edd2c2d27f0db2a96eaef9b6e38 (diff)
downloadmongo-164e785735f0fd8db2e0c68b86c2278ddc92a671.tar.gz
SERVER-41560 default the snapshot window size to 0 when running with the WT inMemory storage engine
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r--src/mongo/db/db.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 3ba6eb79169..652355ee908 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -611,7 +611,11 @@ ExitCode _initAndListen(int listenPort) {
// release periodically in order to avoid storage cache pressure build up.
if (storageEngine->supportsReadConcernSnapshot()) {
PeriodicThreadToAbortExpiredTransactions::get(serviceContext)->start();
- PeriodicThreadToDecreaseSnapshotHistoryCachePressure::get(serviceContext)->start();
+ // The inMemory engine is not yet used for replica or sharded transactions in production so
+ // it does not currently maintain snapshot history. It is live in testing, however.
+ if (!storageEngine->isEphemeral() || getTestCommandsEnabled()) {
+ PeriodicThreadToDecreaseSnapshotHistoryCachePressure::get(serviceContext)->start();
+ }
}
// Set up the logical session cache