Hi,
On a C++ program I tail the oplog.rs to read the new operations on a collection, using QueryOption_CursorTailable | QueryOption_AwaitData.
I filter the documents on "ns", "op", and "o._id" (my collection has a o._id).
I'd like to avoid the full rescan when a new connexion is needed. Adding QueryOption_OplogReplay with a filter on "ts" seems to be the standard solution, but I don't find many information on this special option OplogReplay.
I understand this is for internal use for the replication and it may disappear in the future (but I suppose the replication mechanism will not move a lot).
What does OplogReplay do exactly?
It seems to optimize the search for starting the cursor using "ts", but what is the complexity of this operation?
And does it work with other filters on the query like I do? (I suppose replication does not filter anything and reads all the operations on oplog.rs, so maybe this property is used in the implementation of OplogReplay).
Thanks
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The oplog is a capped collection with a natural order that doesn't change (you can't update documents in a capped collection such that their position in the collection changes). The normal replication cursor only needs to keep track of the value of 'ts'. Your tailable cursor should be the same, unless I misunderstand what you are trying to do.
> Is this property durable though?What property?
> Also, cursor->more() returns every 5 secondes when there is nothing more. Is this timeout configurable somewhere?I don't think so.