diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-09-17 23:22:19 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-17 23:22:19 +0000 |
commit | bc11369435ca51e2ff6897433d00f6b909f6a25f (patch) | |
tree | 251653ec8285d798b41846e343e7e414e80ff277 /src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp | |
parent | 45aea2495306dd61fab46bd398735bb6aaf7b53a (diff) | |
download | mongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp index fbf0b9450a3..647fe8de738 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp @@ -37,7 +37,7 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h" #include "mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h" #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" -#include "mongo/stdx/mutex.h" +#include "mongo/platform/mutex.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/log.h" #include "mongo/util/scopeguard.h" @@ -74,7 +74,7 @@ void WiredTigerOplogManager::start(OperationContext* opCtx, // Need to obtain the mutex before starting the thread, as otherwise it may race ahead // see _shuttingDown as true and quit prematurely. - stdx::lock_guard<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::lock_guard<Latch> lk(_oplogVisibilityStateMutex); _oplogJournalThread = stdx::thread(&WiredTigerOplogManager::_oplogJournalThreadLoop, this, WiredTigerRecoveryUnit::get(opCtx)->getSessionCache(), @@ -86,7 +86,7 @@ void WiredTigerOplogManager::start(OperationContext* opCtx, void WiredTigerOplogManager::halt() { { - stdx::lock_guard<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::lock_guard<Latch> lk(_oplogVisibilityStateMutex); invariant(_isRunning); _shuttingDown = true; _isRunning = false; @@ -120,7 +120,7 @@ void WiredTigerOplogManager::waitForAllEarlierOplogWritesToBeVisible( // Close transaction before we wait. opCtx->recoveryUnit()->abandonSnapshot(); - stdx::unique_lock<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::unique_lock<Latch> lk(_oplogVisibilityStateMutex); // Prevent any scheduled journal flushes from being delayed and blocking this wait excessively. _opsWaitingForVisibility++; @@ -148,7 +148,7 @@ void WiredTigerOplogManager::waitForAllEarlierOplogWritesToBeVisible( } void WiredTigerOplogManager::triggerJournalFlush() { - stdx::lock_guard<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::lock_guard<Latch> lk(_oplogVisibilityStateMutex); if (!_opsWaitingForJournal) { _opsWaitingForJournal = true; _opsWaitingForJournalCV.notify_one(); @@ -174,7 +174,7 @@ void WiredTigerOplogManager::_oplogJournalThreadLoop(WiredTigerSessionCache* ses // waitUntilDurable() call requiring an opCtx parameter. opCtx->swapLockState(std::make_unique<LockerImpl>()); - stdx::unique_lock<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::unique_lock<Latch> lk(_oplogVisibilityStateMutex); { MONGO_IDLE_THREAD_BLOCK; _opsWaitingForJournalCV.wait(lk, @@ -251,7 +251,7 @@ std::uint64_t WiredTigerOplogManager::getOplogReadTimestamp() const { } void WiredTigerOplogManager::setOplogReadTimestamp(Timestamp ts) { - stdx::lock_guard<stdx::mutex> lk(_oplogVisibilityStateMutex); + stdx::lock_guard<Latch> lk(_oplogVisibilityStateMutex); _setOplogReadTimestamp(lk, ts.asULL()); } |