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
0
votes
1 answer

MongoDB Oplogs on Hidden Nodes

I understand that the Oplog in a Mongo replicaset is the information being copied to from the primary node to the secondary (or hidden) nodes. I have an application that stores a lot of pictures. I configured the Primary and Secondary Mongo nodes…
FCR
  • 1,103
  • 10
  • 25
0
votes
2 answers

Configure Oplog Size in MongoDB Bitnami Replicaset Architecture

I cannot find the way to configure a higher MongoDB oplog size in the Bitnami Helm chart for MongoDB, here. My understanding is that the oplog will keep all the recent data up to a certain size, or age, and then discard it. That oplog allows…
FCR
  • 1,103
  • 10
  • 25
0
votes
1 answer

Oplog does not record operations within a transaction - MongoDb

If you run the below code, outside a transaction object will appear in the oplog as an insert operation but oplog will have no record of inside a transaction but they will be both saved properly to the collection. I tried to look up the problem with…
Mazen Elkashef
  • 3,430
  • 6
  • 44
  • 72
0
votes
2 answers

In Spring MongoDB update, MonogDB doc replaced/lost fields, becomes empty, oplog "o" for this update has no $set, $unset, has only objectId as in "o2"

Context: Spring Data MongoDB is used and updating a document caused the following issue. Issue : After an update operation performed, document in collection lost all the data and kept only ObjectId in it. Checking the oplog entry found an unusual…
Mahudees
  • 41
  • 6
0
votes
1 answer

Get collection operation sequence MongoDB

I need to get sequence of collection operation in runtime by daemon to write it to system similar to message broker. Necessary ability to read history from a specified position Probably I can solve this problem by reading opLog. Is it the correct…
VoidName
  • 340
  • 2
  • 16
0
votes
1 answer

MongoDB enable oplog windows

Try to enable oplog locally Add to C:\Program Files\MongoDB\Server\4.2\bin\mongod.cfg replication: replSetName: rs0 oplogSizeMB: 100 Restart mongod, but local.oplog does not exist How correctly enable oplog? UPD: Use MongoDB 4.2, Windows 10
VoidName
  • 340
  • 2
  • 16
0
votes
0 answers

ChangeStream#destroy is not a method?

I got this error: app:tail-mongodb ERROR Unhandled rejection: z.cs.destroy is not a function TypeError: z.cs.destroy is not a function at createChangeStream (/Users/Olegzandr/codes/interos/read-from-mongodb/dist/main.js:74:18) at…
user11810894
0
votes
1 answer

MongoDB track which user mande changes

We're running a microservice architecture with multiple systems having access to shared collections in a MongoDB (yes, questionable design, but we're in the transition to get out of this.) We're trying to find a way to track which change within the…
Nils Ziehn
  • 4,118
  • 6
  • 26
  • 40
0
votes
1 answer

Distinction between Mongodb Oplog and System Profiler

I'm new to MongoDB and am trying to track operations on my database. Based on the documentation it seems like operations like inserts should be in both the oplog and profiler, but I only see it recorded in the profiler. For context, I am making…
llu
  • 1
  • 1
0
votes
0 answers

Mongo Oplog - Extracting Specifics of Updates

Say I have an entry in the inventory collection that looks like { _id: 1, item: "polarizing_filter", tags: [ "electronics", "camera" ]} and I issue the command db.inventory.update( { _id: 1 }, { $addToSet: { tags: "accessories" } } ) I have…
BobbyPin
  • 59
  • 6
0
votes
1 answer

Replaying oplog in another mongodb instance from already running cluster's primary instance using golang

I am storing oplogs in json format from primary mongodb instance…
Udit Bhardwaj
  • 1,761
  • 1
  • 19
  • 29
0
votes
1 answer

mongodb oplog: does "insert" op add "create collection" op?

When we insert a document, if the database and/or collection do not exist, they are create before the insert. Is this "create db/collection" operation available in the oplog? The reason I'm interested, is because we want to upgrade from v2.4 to v3.2…
XeniaSis
  • 2,192
  • 5
  • 24
  • 39
0
votes
1 answer

Using mongorestore for oplogreplay with --numInsertionWorkersPerCollection / concurrently using mongorestore for oplog replay

If I use mongorestore with -- numInsertionWorkersPerCollection > 1 for oplogreplay, it does not bring any performance improvement.I have a 8 core machine with 64 GB RAM and my complete oplog size is around 1 GB (around 1 million request on same…
0
votes
1 answer

Impact of `oplog` in meteor application

I implemented oplog on our server and that time our application response time improved but after some hour response time increased and application response was very slow. Can you let me know the Disadvantage of Oplog Impact of Oplog on Meteor…
sakshi
  • 171
  • 1
  • 1
  • 14
0
votes
0 answers

Mongo service not restart after Oplog Implementation

I added below code in mongod.conf file for oplog implementation replication: replSetName:rs0 oplogSizeMB:100 master:true After this I restart mongod service but error is coming. sudo service mongod restart
sakshi
  • 171
  • 1
  • 1
  • 14