summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <cheahuychou.mao@mongodb.com>2020-06-09 16:00:25 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-09 22:39:48 +0000
commit0620421a92e9fb9d3e638c1a221ed43b49641516 (patch)
treebeb2c74b41df11c084b25ab119d792a2e5374cdd
parent0ba63f264cc0be3bbc77e35ed94306c394ca95d9 (diff)
downloadmongo-0620421a92e9fb9d3e638c1a221ed43b49641516.tar.gz
SERVER-48674 Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl
(cherry picked from commit b0f169be52251fca55b00715c55fa9c4f0220fb3)
-rw-r--r--src/mongo/db/logical_session_cache_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/logical_session_cache_impl.cpp b/src/mongo/db/logical_session_cache_impl.cpp
index 1a0e2f0d13e..857e33b1568 100644
--- a/src/mongo/db/logical_session_cache_impl.cpp
+++ b/src/mongo/db/logical_session_cache_impl.cpp
@@ -158,7 +158,7 @@ Status LogicalSessionCacheImpl::_reap(Client* client) {
}();
const auto replCoord = repl::ReplicationCoordinator::get(opCtx);
- if (replCoord && replCoord->getMemberState().arbiter()) {
+ if (replCoord && replCoord->isReplEnabled() && replCoord->getMemberState().arbiter()) {
return Status::OK();
}
@@ -234,7 +234,7 @@ void LogicalSessionCacheImpl::_refresh(Client* client) {
}();
const auto replCoord = repl::ReplicationCoordinator::get(opCtx);
- if (replCoord && replCoord->getMemberState().arbiter()) {
+ if (replCoord && replCoord->isReplEnabled() && replCoord->getMemberState().arbiter()) {
return;
}