diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-07-01 14:49:26 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-07-01 21:28:57 -0400 |
commit | 164e785735f0fd8db2e0c68b86c2278ddc92a671 (patch) | |
tree | 3055b20b0e90aecc3003cb276cbf0350d8ab5ef8 /src/mongo/db/db.cpp | |
parent | b9198150102c2edd2c2d27f0db2a96eaef9b6e38 (diff) | |
download | mongo-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.cpp | 6 |
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 |