diff options
author | Lingzhi Deng <lingzhi.deng@mongodb.com> | 2019-10-03 01:20:43 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-03 01:20:43 +0000 |
commit | 14b7efe1c6b5a00eac88e12c42ad31730db18fec (patch) | |
tree | e71ef3e138042cb38b4588ce7da2be71e43141fd /src/mongo/db/repl | |
parent | e19a6b321d73f5e7df177895e6ee5a596f60602a (diff) | |
download | mongo-14b7efe1c6b5a00eac88e12c42ad31730db18fec.tar.gz |
SERVER-43136: Avoid making an unnecessary copy of the _rsConfig
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index b01326ced36..03e4e7d74cb 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -3805,7 +3805,8 @@ void ReplicationCoordinatorImpl::_prepareOplogQueryMetadata_inlock(int rbid, } bool ReplicationCoordinatorImpl::getWriteConcernMajorityShouldJournal() { - return getConfig().getWriteConcernMajorityShouldJournal(); + stdx::unique_lock lock(_mutex); + return getWriteConcernMajorityShouldJournal_inlock(); } bool ReplicationCoordinatorImpl::getWriteConcernMajorityShouldJournal_inlock() const { |