diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-10-10 10:31:02 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-10-10 14:50:19 -0400 |
commit | 63222d35678ad0bc3419e6e4bdd586da5b16acce (patch) | |
tree | b0ff145cae1305ad9d22907dd59908360d19d8cc /src/mongo/db/write_concern.cpp | |
parent | db00a0d9b5045f609c1dc2647ed6ebe1bd2a339f (diff) | |
download | mongo-63222d35678ad0bc3419e6e4bdd586da5b16acce.tar.gz |
SERVER-31184 Cleanup usages of global service context objects
Also cleans up some formatting, no functional changes.
Diffstat (limited to 'src/mongo/db/write_concern.cpp')
-rw-r--r-- | src/mongo/db/write_concern.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/write_concern.cpp b/src/mongo/db/write_concern.cpp index 234f63f54aa..c29254226e2 100644 --- a/src/mongo/db/write_concern.cpp +++ b/src/mongo/db/write_concern.cpp @@ -166,7 +166,8 @@ Status waitForWriteConcern(OperationContext* opCtx, WriteConcernResult* result) { LOG(2) << "Waiting for write concern. OpTime: " << replOpTime << ", write concern: " << writeConcern.toBSON(); - auto replCoord = repl::ReplicationCoordinator::get(opCtx); + + auto const replCoord = repl::ReplicationCoordinator::get(opCtx); if (!opCtx->getClient()->isInDirectClient()) { // Respecting this failpoint for internal clients prevents stepup from working properly. @@ -233,9 +234,9 @@ Status waitForWriteConcern(OperationContext* opCtx, } // Add stats - result->writtenTo = repl::getGlobalReplicationCoordinator()->getHostsWrittenTo( - replOpTime, - writeConcernWithPopulatedSyncMode.syncMode == WriteConcernOptions::SyncMode::JOURNAL); + result->writtenTo = replCoord->getHostsWrittenTo(replOpTime, + writeConcernWithPopulatedSyncMode.syncMode == + WriteConcernOptions::SyncMode::JOURNAL); gleWtimeStats.recordMillis(durationCount<Milliseconds>(replStatus.duration)); result->wTime = durationCount<Milliseconds>(replStatus.duration); |