summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/client/dbclient.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/client/dbclient.cpp b/src/mongo/client/dbclient.cpp
index f8349afdf6f..3140f3ab439 100644
--- a/src/mongo/client/dbclient.cpp
+++ b/src/mongo/client/dbclient.cpp
@@ -894,6 +894,7 @@ namespace mongo {
// first we're going to try the command
// it was only added in 2.8, so if we're talking to an older server
// we'll fail back to querying system.namespaces
+ // TODO(spencer): remove fallback behavior after 2.8
{
BSONObj res;
@@ -929,7 +930,8 @@ namespace mongo {
fallbackFilter.appendElementsUnique( filter );
string ns = db + ".system.namespaces";
- auto_ptr<DBClientCursor> c = query( ns.c_str(), fallbackFilter.obj() );
+ auto_ptr<DBClientCursor> c = query(
+ ns.c_str(), fallbackFilter.obj(), 0, 0, 0, QueryOption_SlaveOk);
while ( c->more() ) {
BSONObj obj = c->nextSafe();
string ns = obj["name"].valuestr();
@@ -1362,8 +1364,9 @@ namespace mongo {
}
// fallback to querying system.indexes
+ // TODO(spencer): Remove fallback behavior after 2.8
auto_ptr<DBClientCursor> cursor = query(NamespaceString(ns).getSystemIndexesCollection(),
- BSON("ns" << ns));
+ BSON("ns" << ns), 0, 0, 0, options);
while ( cursor->more() ) {
BSONObj spec = cursor->nextSafe();
specs.push_back( spec.getOwned() );