summaryrefslogtreecommitdiff
path: root/s/strategy.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-02-05 17:52:07 -0500
committerEliot Horowitz <eliot@10gen.com>2011-02-05 17:52:37 -0500
commited2b128e5de0ddd2bf5303fda7980bd1d0b2c683 (patch)
tree16f026cf326fd6dc83f5473d2100158b9a8f31f4 /s/strategy.cpp
parent471fd7da06644d80c906e2ac69190216791ef450 (diff)
downloadmongo-ed2b128e5de0ddd2bf5303fda7980bd1d0b2c683.tar.gz
fix SlaveOk getMore with replica sets for non sharded collections SERVER-2482
Diffstat (limited to 's/strategy.cpp')
-rw-r--r--s/strategy.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/s/strategy.cpp b/s/strategy.cpp
index d562507bc65..7c1fb0bff33 100644
--- a/s/strategy.cpp
+++ b/s/strategy.cpp
@@ -49,8 +49,10 @@ namespace mongo {
ShardConnection dbcon( shard , r.getns() );
DBClientBase &c = dbcon.conn();
+ string actualServer;
+
Message response;
- bool ok = c.call( r.m(), response);
+ bool ok = c.call( r.m(), response, true , &actualServer );
uassert( 10200 , "mongos: error calling db", ok );
{
@@ -61,7 +63,7 @@ namespace mongo {
}
}
- r.reply( response , c.getServerAddress() );
+ r.reply( response , actualServer.size() ? actualServer : c.getServerAddress() );
dbcon.done();
}