summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Myers <ncm@asperasoft.com>2016-09-16 17:42:22 -0400
committerNathan Myers <ncm@asperasoft.com>2016-09-16 17:42:22 -0400
commitbe5bbd938a75d5532ed52df03f6e17ef818a3f66 (patch)
treeca58a83d322cc0637ae9b33ef35245aea5ecfa2a
parentf4600bb330c1ed7975fe4ec7562dbda40efb2d8f (diff)
downloadmongo-be5bbd938a75d5532ed52df03f6e17ef818a3f66.tar.gz
SERVER-25009 check null ReplicaSetMonitor::get(), connection string
-rw-r--r--src/mongo/client/parallel.cpp1
-rw-r--r--src/mongo/client/remote_command_targeter_rs.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/client/parallel.cpp b/src/mongo/client/parallel.cpp
index 986d642ecdc..f4a89a9e45b 100644
--- a/src/mongo/client/parallel.cpp
+++ b/src/mongo/client/parallel.cpp
@@ -410,6 +410,7 @@ void ParallelSortClusteredCursor::setupVersionAndHandleSlaveOk(
const DBClientReplicaSet* replConn = dynamic_cast<const DBClientReplicaSet*>(rawConn);
invariant(replConn);
ReplicaSetMonitorPtr rsMonitor = ReplicaSetMonitor::get(replConn->getSetName());
+ uassert(16388, "cannot access unknown replica set:", rsMonitor != nullptr);
if (!rsMonitor->isKnownToHaveGoodPrimary()) {
state->conn->donotCheckVersion();
diff --git a/src/mongo/client/remote_command_targeter_rs.cpp b/src/mongo/client/remote_command_targeter_rs.cpp
index b3d1e603031..b389df23f0e 100644
--- a/src/mongo/client/remote_command_targeter_rs.cpp
+++ b/src/mongo/client/remote_command_targeter_rs.cpp
@@ -57,7 +57,7 @@ RemoteCommandTargeterRS::RemoteCommandTargeterRS(const std::string& rsName,
}
ConnectionString RemoteCommandTargeterRS::connectionString() {
- return fassertStatusOK(28712, ConnectionString::parse(_rsMonitor->getServerAddress()));
+ return uassertStatusOK(ConnectionString::parse(_rsMonitor->getServerAddress()));
}
StatusWith<HostAndPort> RemoteCommandTargeterRS::findHostWithMaxWait(