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

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -