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/s/active_migrations_registry.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/s/active_migrations_registry.cpp')
-rw-r--r-- | src/mongo/db/s/active_migrations_registry.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/s/active_migrations_registry.cpp b/src/mongo/db/s/active_migrations_registry.cpp index a3854cb9038..def2a02bac2 100644 --- a/src/mongo/db/s/active_migrations_registry.cpp +++ b/src/mongo/db/s/active_migrations_registry.cpp @@ -60,7 +60,7 @@ ActiveMigrationsRegistry& ActiveMigrationsRegistry::get(OperationContext* opCtx) StatusWith<ScopedDonateChunk> ActiveMigrationsRegistry::registerDonateChunk( const MoveChunkRequest& args) { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); if (_activeReceiveChunkState) { return _activeReceiveChunkState->constructErrorStatus(); } @@ -80,7 +80,7 @@ StatusWith<ScopedDonateChunk> ActiveMigrationsRegistry::registerDonateChunk( StatusWith<ScopedReceiveChunk> ActiveMigrationsRegistry::registerReceiveChunk( const NamespaceString& nss, const ChunkRange& chunkRange, const ShardId& fromShardId) { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); if (_activeReceiveChunkState) { return _activeReceiveChunkState->constructErrorStatus(); } @@ -95,7 +95,7 @@ StatusWith<ScopedReceiveChunk> ActiveMigrationsRegistry::registerReceiveChunk( } boost::optional<NamespaceString> ActiveMigrationsRegistry::getActiveDonateChunkNss() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); if (_activeMoveChunkState) { return _activeMoveChunkState->args.getNss(); } @@ -106,7 +106,7 @@ boost::optional<NamespaceString> ActiveMigrationsRegistry::getActiveDonateChunkN BSONObj ActiveMigrationsRegistry::getActiveMigrationStatusReport(OperationContext* opCtx) { boost::optional<NamespaceString> nss; { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); if (_activeMoveChunkState) { nss = _activeMoveChunkState->args.getNss(); @@ -132,13 +132,13 @@ BSONObj ActiveMigrationsRegistry::getActiveMigrationStatusReport(OperationContex } void ActiveMigrationsRegistry::_clearDonateChunk() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); invariant(_activeMoveChunkState); _activeMoveChunkState.reset(); } void ActiveMigrationsRegistry::_clearReceiveChunk() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); invariant(_activeReceiveChunkState); _activeReceiveChunkState.reset(); } |