diff options
author | Dianna Hohensee <dianna.hohensee@mongodb.com> | 2019-10-21 15:46:50 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-21 15:46:50 +0000 |
commit | 95584cd484eb94e8a3266e23f6594338ed878b88 (patch) | |
tree | 23bef212ece3532199694c7e385e210755fc3a04 /src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp | |
parent | ce3261545db4767f18e390c50d59c6530e948655 (diff) | |
download | mongo-95584cd484eb94e8a3266e23f6594338ed878b88.tar.gz |
SERVER-43942 track newly created indexes until they are part of a consistent WT checkpoint, and skip them in background validation
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp index cf04a16d550..d56d6ebbf6b 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp @@ -273,8 +273,11 @@ void WiredTigerSessionCache::waitUntilDurable(OperationContext* opCtx, stdx::unique_lock<Latch> lk(_journalListenerMutex); JournalListener::Token token = _journalListener->getToken(); auto config = stableCheckpoint ? "use_timestamp=true" : "use_timestamp=false"; - auto checkpointLock = _engine->getCheckpointLock(opCtx); - invariantWTOK(s->checkpoint(s, config)); + { + auto checkpointLock = _engine->getCheckpointLock(opCtx); + _engine->clearIndividuallyCheckpointedIndexesList(); + invariantWTOK(s->checkpoint(s, config)); + } _journalListener->onDurable(token); } LOG(4) << "created checkpoint (forced)"; @@ -311,6 +314,7 @@ void WiredTigerSessionCache::waitUntilDurable(OperationContext* opCtx, LOG(4) << "flushed journal"; } else { auto checkpointLock = _engine->getCheckpointLock(opCtx); + _engine->clearIndividuallyCheckpointedIndexesList(); invariantWTOK(_waitUntilDurableSession->checkpoint(_waitUntilDurableSession, nullptr)); LOG(4) << "created checkpoint"; } |