Questions tagged [mongodb-oplog]

A fixed-sized collection that automatically overwrites its oldest entries when it reaches its maximum size which stores an ordered history of logical writes to a MongoDB. Also, the oplog is the basic mechanism enabling replication in MongoDB.

More details : https://docs.mongodb.com/manual/core/replica-set-oplog/

71 questions
1
vote
0 answers

mongotools collection restore Oplog warnings

I regularly reinstate prod data into testing environments on MongoDB Atlas. I delete it and perform a mongotools restore --collection myCollection. I have good reasons.not to replace the whole dB. Is there a way to avoid hammering the oplog during…
C. Claudio
  • 177
  • 13
1
vote
1 answer

Why the Oplog decreasing Mongodb

What type of query generates a decrease in the oplog? How do I find out which queries are affecting my oplog decrease (when comparing month to month)? Could you help me?
1
vote
1 answer

How to filter on collection in deployment level changestream in mongodb java sdk

I am trying to setup a deployment level change stream with a pipeline filter on collection name using MongoDB java SDK. Here is the code snippet. List pipeline = Collections.singletonList(Aggregates.match(Filters.or( …
Joydip Datta
  • 439
  • 3
  • 8
1
vote
1 answer

How to shrink MongoDB's oplog.rs collection?

After storing some binary data in MongoDB 4.2.5 (3 nodes replicate set) the oplog.rs collection did grow to ca. 700MB. The binary data was removed and the data model restructured, but the oplog.rs collection stays the same size (as expected). I do…
Dávid Molnár
  • 10,673
  • 7
  • 30
  • 55
1
vote
1 answer

Meter Redis Scaling update `could not find the collection`

I added Meteor redis oplog scaling these days but it keeps showing below errors. meteor add cultofcoders:redis-oplog meteor add disable-oplog W20200206-03:35:20.827(0)? (STDERR) error caught on publication: undefined : [We could not find the…
1
vote
0 answers

Problems with replica set and oplog tailing on MongoDB 4.x

I'm migrating my app to a new server and I can't get oplog tailing to work. The idea is to set up a single replica set so there is an oplog for my Meteor app to tail. I followed the same process as on the old server where it works fine. There is no…
Little Brain
  • 2,647
  • 1
  • 30
  • 54
1
vote
1 answer

MongoDB : How to exclude a collection from generating oplog

I am working on processing the mongodb oplog and I create a collection in mongodb to add the processed data and I don't want this collection to again generate oplog. I want all other collection to generate oplog but need to exclude one of the…
Renukaradhya
  • 812
  • 2
  • 19
  • 31
1
vote
1 answer

Analyze Mongo oplog for "biggest" queries

Question: Is there a way to know the actual size of a sample document in collection (namely oplog)? My oplog appears to be too small for the data. I have an idea which queries are likely the biggest contributor, but I'd like to gauge the impact of…
glock18
  • 670
  • 5
  • 11
1
vote
0 answers

Does MongoDB Atlas support Meteor's oplog tailing on its shared/free tier?

Meteor supports oplog tailing on a MongoDB replica set for more efficient updates. MongoDB Atlas has a free/shared tier that provides a replica set, with some limitations: specifically, that the oplog can only be queried by string namespaces. This…
Andrew Mao
  • 35,740
  • 23
  • 143
  • 224
1
vote
2 answers

Get Timestamp respresenting now (current time) for querying mongodb oplog

The oplog has a field called ts, which looks like this: {"ts":"6533707677506207745","t":2,"h":"-7325657776689654694", ...} I want to query the oplog, like so: db.oplog.rs.find({ts:{$gt:x}}); how can I generate a Timestamp, that represents now? How…
user7898461
1
vote
2 answers

mongodb oplog replay ops on missing documents

A client of ours is creating hourly mongo dumps and sends them over to us. We, then, replay the oplog. However, the client decided that he doesn't want to send over all dumps anymore, but only those needed for debugging in emergency cases. However,…
XeniaSis
  • 2,192
  • 5
  • 24
  • 39
1
vote
1 answer

Applying oplog but found duplicate key error

Mongo version is 3.0.6, I have a process to apply oplog from another database to destination database by mongodump and mongorestore by using --oplogReplay option. But I found duplicate key error messages many time, source and target database have…
tao hiko
  • 113
  • 1
  • 11
1
vote
0 answers

Mongo 3.4 oplog timestamp to epoch

I am trying to convert oplog ts field to unix epoch time. oplog document { "ts" : Timestamp(6454921106666029, 1), "t" : NumberLong(2), "h" : NumberLong(-7592058469580740624), "v" : 2, "op" : "n", "ns" : "", "o" : { …
Pari
  • 1,443
  • 3
  • 19
  • 34
1
vote
0 answers

mongodump with multiple queries and oplog

Note: this question would usually be a better fit in the Database Administrators Stack Exchange however I have a hunch it requires some programming to solve so I posted it here. Is there a way to pass multiple queries to mongodump to filter several…
Hayko Koryun
  • 1,214
  • 2
  • 12
  • 30
1
vote
0 answers

Why does mogodb 3.4.0 uses more oplog space than specified in the configuration file?

In our configuration file of our secondary database we defined an oplog size of 99GB (oplogSizeMB: 99000) but after a few hours we already encounter a size of more than 120 GB (1 file with 74 GB and a second file with 65 GB). -rw-rw-r-- 1 flugpool…
Christian Ehrl
  • 161
  • 2
  • 7