summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2014-06-30 11:16:41 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2014-07-03 08:07:42 -0400
commit176e32c2d21da5e3f9f2c3f51a23572974111131 (patch)
tree79e5e26047c734e996331b1dddcb595c874469bf /src/mongo/db/clientcursor.cpp
parent1edad42278a0708590f7a695f0dc66134256a6e8 (diff)
downloadmongo-176e32c2d21da5e3f9f2c3f51a23572974111131.tar.gz
SERVER-14135 implement processHandshake() in LegacyReplicationCoordinator
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index 7084a0699ea..80fb8d0694e 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -160,7 +160,7 @@ namespace mongo {
_idleAgeMillis = millis;
}
- void ClientCursor::updateSlaveLocation( CurOp& curop ) {
+ void ClientCursor::updateSlaveLocation(CurOp& curop) {
if (_slaveReadTill.isNull())
return;
@@ -168,25 +168,11 @@ namespace mongo {
Client* c = curop.getClient();
verify(c);
- BSONObj rid = c->getRemoteID();
- if (rid.isEmpty())
+ OID rid = c->getRemoteID();
+ if (!rid.isSet())
return;
- BSONObj handshake = c->getHandshake();
- if (handshake.hasField("config")) {
- repl::getGlobalReplicationCoordinator()->setLastOptime(rid["_id"].OID(),
- _slaveReadTill,
- handshake["config"].Obj());
- }
- else {
- BSONObjBuilder bob;
- bob.append("host", curop.getRemoteString());
- bob.append("upgradeNeeded", true);
- repl::getGlobalReplicationCoordinator()->setLastOptime(rid["_id"].OID(),
- _slaveReadTill,
- bob.done());
- }
-
+ repl::getGlobalReplicationCoordinator()->setLastOptime(rid, _slaveReadTill);
}
//