diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-01-25 01:22:18 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-01-25 01:22:18 -0500 |
commit | 72231559d2727473f3fccada4bf8dd94f42a1ea9 (patch) | |
tree | c64b2920ca3476349f1544d8b783c5de1cc20cc7 /src/mongo/client/dbclientcursor.h | |
parent | 5d7fa5c8f25bc8e78c4cabf29a382c6950b720b5 (diff) | |
download | mongo-72231559d2727473f3fccada4bf8dd94f42a1ea9.tar.gz |
fix slave ok getMore cursors via mongos by storing actual server used
Diffstat (limited to 'src/mongo/client/dbclientcursor.h')
-rw-r--r-- | src/mongo/client/dbclientcursor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/client/dbclientcursor.h b/src/mongo/client/dbclientcursor.h index 31bf1bb1d5e..d7661438516 100644 --- a/src/mongo/client/dbclientcursor.h +++ b/src/mongo/client/dbclientcursor.h @@ -138,6 +138,7 @@ namespace mongo { cursorId(), _ownCursor( true ), wasError( false ) { + _finishConsInit(); } DBClientCursor( DBClientBase* client, const string &_ns, long long _cursorId, int _nToReturn, int options ) : @@ -148,6 +149,7 @@ namespace mongo { opts( options ), cursorId(_cursorId), _ownCursor( true ) { + _finishConsInit(); } virtual ~DBClientCursor(); @@ -161,6 +163,8 @@ namespace mongo { void attach( AScopedConnection * conn ); + string originalHost() const { return _originalHost; } + Message* getMessage(){ return batch.m.get(); } /** @@ -186,9 +190,11 @@ namespace mongo { friend class DBClientConnection; int nextBatchSize(); + void _finishConsInit(); Batch batch; DBClientBase* _client; + string _originalHost; string ns; BSONObj query; int nToReturn; |