summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@mongodb.com>2019-10-21 17:16:44 +0000
committerevergreen <evergreen@mongodb.com>2019-10-21 17:16:44 +0000
commit1eb2c076c7d3fe53a0f3e3990112ad3aa46e2f1a (patch)
tree54d726fe0f6c221ae10b3c8c9f4994a6fd5c03b3 /src/mongo/db/storage
parentd97cca2c6d5be0324da0dc4d56ca269714af8f34 (diff)
downloadmongo-1eb2c076c7d3fe53a0f3e3990112ad3aa46e2f1a.tar.gz
SERVER-43839 Create unit testing for ValidateState.
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index aa185066b2b..7f0d0d4982e 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -100,6 +100,15 @@ using namespace fmt::literals;
namespace mongo {
+namespace {
+
+MONGO_FAIL_POINT_DEFINE(WTPreserveSnapshotHistoryIndefinitely);
+MONGO_FAIL_POINT_DEFINE(WTSetOldestTSToStableTS);
+
+MONGO_FAIL_POINT_DEFINE(pauseCheckpointThread);
+
+} // namespace
+
bool WiredTigerFileVersion::shouldDowngrade(bool readOnly,
bool repairMode,
bool hasRecoveryTimestamp) {
@@ -331,6 +340,8 @@ public:
wiredTigerGlobalOptions.checkpointDelaySecs)));
}
+ pauseCheckpointThread.pauseWhileSet();
+
// Might have been awakened by another thread shutting us down.
if (_shuttingDown.load()) {
break;
@@ -1639,13 +1650,6 @@ void WiredTigerKVEngine::setJournalListener(JournalListener* jl) {
return _sessionCache->setJournalListener(jl);
}
-namespace {
-
-MONGO_FAIL_POINT_DEFINE(WTPreserveSnapshotHistoryIndefinitely);
-MONGO_FAIL_POINT_DEFINE(WTSetOldestTSToStableTS);
-
-} // namespace
-
void WiredTigerKVEngine::setStableTimestamp(Timestamp stableTimestamp, bool force) {
if (stableTimestamp.isNull()) {
return;