private DBCursor oplogCursor(final BSONTimestamp timestampOverride) {BSONTimestamp time = timestampOverride == null? MongoDBRiver.getLastTimestamp(client, definition) : timestampOverride;DBObject indexFilter = getOplogFilter(time);if (indexFilter == null) {return null;}int options = Bytes.QUERYOPTION_TAILABLE| Bytes.QUERYOPTION_AWAITDATA | Bytes.QUERYOPTION_NOTIMEOUT;// Using OPLOGREPLAY to improve performance:if (indexFilter.containsField(MongoDBRiver.OPLOG_TIMESTAMP)) {options = options | Bytes.QUERYOPTION_OPLOGREPLAY;}return oplogCollection.find(indexFilter).sort(new BasicDBObject(MongoDBRiver.MONGODB_NATURAL_OPERATOR, 1)).setOptions(options);}
> See also the IRC channel -- freenode.net#mongodb
>
> ---
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongodb-user+unsubscribe@googlegroups.com.
You want to tail it from last processed event when you requery to avoid getting entire oplog being queried on reconnection.
Asya
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/E7BSv624nBg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
Basically what will be the extra cost on MongoDB side of using oplog.rs.find({ ts : { $gte : ... }, ... }).sort({$natural:1} vs oplog.rs.find().sort({$natural:1}?