diff options
| author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
|---|---|---|
| committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2025-02-18 17:02:53 -0300 |
| commit | 959575a5ca598bf5f37fb5cebe7ed1d80d3d71f7 (patch) | |
| tree | acc8d60aedb12b70048e676e8a7349deb0010db8 /src/mongo/db/storage/storage_engine_impl.cpp | |
| parent | 76588293975fc059cf076779e4283e6ffaf8afff (diff) | |
New upstream version 6.0.20upstream
Diffstat (limited to 'src/mongo/db/storage/storage_engine_impl.cpp')
| -rw-r--r-- | src/mongo/db/storage/storage_engine_impl.cpp | 13 |
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; |
