mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-17214 do not use exists() as its fallback behavior does not support collections with $ in the name
This commit is contained in:
parent
d408142cdc
commit
4ca116443f
@ -318,11 +318,9 @@ namespace repl {
|
||||
ReplSource tmp(txn, obj);
|
||||
if ( tmp.syncedTo.isNull() ) {
|
||||
DBDirectClient c(txn);
|
||||
if ( c.exists( "local.oplog.$main" ) ) {
|
||||
BSONObj op = c.findOne( "local.oplog.$main", QUERY( "op" << NE << "n" ).sort( BSON( "$natural" << -1 ) ) );
|
||||
if ( !op.isEmpty() ) {
|
||||
tmp.syncedTo = op[ "ts" ].date();
|
||||
}
|
||||
BSONObj op = c.findOne( "local.oplog.$main", QUERY( "op" << NE << "n" ).sort( BSON( "$natural" << -1 ) ) );
|
||||
if ( !op.isEmpty() ) {
|
||||
tmp.syncedTo = op[ "ts" ].date();
|
||||
}
|
||||
}
|
||||
addSourceToList(txn, v, tmp, old);
|
||||
|
Loading…
Reference in New Issue
Block a user