0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-841 don't use dummy op when figuring other side's log endpoint

This commit is contained in:
Aaron 2010-03-29 16:35:06 -07:00
parent 3c0f6e00cd
commit e339760675

View File

@ -735,7 +735,7 @@ namespace mongo {
( replPair && replSettings.fastsync ) ) {
DBDirectClient c;
if ( c.exists( "local.oplog.$main" ) ) {
BSONObj op = c.findOne( "local.oplog.$main", Query().sort( BSON( "$natural" << -1 ) ) );
BSONObj op = c.findOne( "local.oplog.$main", QUERY( "op" << NE << "n" ).sort( BSON( "$natural" << -1 ) ) );
if ( !op.isEmpty() ) {
tmp.syncedTo = op[ "ts" ].date();
tmp._lastSavedLocalTs = op[ "ts" ].date();