java - Why mongodb oplog is always empty? -


i'm trying write synchronizer between mongodb , lucene. idea implement application tail oplog , reproduce in lucene. basis i'm using this post

the problem oplog empty:

rs0:primary> db.oplog.rs.find({},{"ts":1}).sort({$natural: -1}).hasnext() false  rs0:primary> db.message.find({}).count() 729  rs0:primary> db.oplog.rs.find({}).hasnext() false  rs0:primary> db.oplog.rs.find() rs0:primary>  

can explain me i'm doing wrong?

all replica set members contain copy of oplog, in local.oplog.rs collection. in order query oplog have use local database.

use local; db.oplog.rs.find(); 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -