diff options
author | Benety Goh <benety@mongodb.com> | 2015-06-10 15:04:34 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2015-06-18 15:26:58 -0400 |
commit | 94543115f64345f3bb74b2508b1b319d6b6cf68d (patch) | |
tree | bbda2a18e71651ff71f02abc970dc825d7b968b9 /src/mongo/s/d_state.cpp | |
parent | 2a20332297dc32a87433416413bb098ebac19e2f (diff) | |
download | mongo-94543115f64345f3bb74b2508b1b319d6b6cf68d.tar.gz |
SERVER-18036 fixed NamespaceString usage in some commands, especially in cases where the only purpose is to extract the database name
Diffstat (limited to 'src/mongo/s/d_state.cpp')
-rw-r--r-- | src/mongo/s/d_state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/s/d_state.cpp b/src/mongo/s/d_state.cpp index 8475777b76c..89c5f2d52c8 100644 --- a/src/mongo/s/d_state.cpp +++ b/src/mongo/s/d_state.cpp @@ -1083,7 +1083,7 @@ namespace mongo { // we can run on a slave up to here if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesForDatabase( - NamespaceString(ns).db())) { + nsToDatabase(ns))) { result.append( "errmsg" , "not master" ); result.append( "note" , "from post init in setShardVersion" ); return false; @@ -1362,7 +1362,7 @@ namespace mongo { return true; if (!repl::getGlobalReplicationCoordinator()->canAcceptWritesForDatabase( - NamespaceString(ns).db())) { + nsToDatabase(ns))) { // right now connections to secondaries aren't versioned at all return true; } |