summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/storage_engine_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/storage/storage_engine_impl.cpp')
-rw-r--r--src/mongo/db/storage/storage_engine_impl.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp
index 26a7fc9dae0..21f04d4445a 100644
--- a/src/mongo/db/storage/storage_engine_impl.cpp
+++ b/src/mongo/db/storage/storage_engine_impl.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/catalog_raii.h"
#include "mongo/db/client.h"
#include "mongo/db/concurrency/d_concurrency.h"
+#include "mongo/db/concurrency/lock_state.h"
#include "mongo/db/index_builds_coordinator.h"
#include "mongo/db/multitenancy.h"
#include "mongo/db/operation_context.h"
@@ -1235,12 +1236,12 @@ void StorageEngineImpl::TimestampMonitor::_startup() {
}
try {
- auto opCtx = client->getOperationContext();
- mongo::ServiceContext::UniqueOperationContext uOpCtx;
- if (!opCtx) {
- uOpCtx = client->makeOperationContext();
- opCtx = uOpCtx.get();
- }
+ auto uniqueOpCtx = client->makeOperationContext();
+ auto opCtx = uniqueOpCtx.get();
+
+ // The TimestampMonitor is an important background cleanup task for the storage
+ // engine and needs to be able to make progress to free up resources.
+ SkipTicketAcquisitionForLock skipTicketAcquisition(opCtx);
Timestamp checkpoint;
Timestamp oldest;