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

Hi, I wanted to know to know if there is way to print out mongo oplog into a textfile

I have downloaded MongoDB and setup replication on my computer. I also have node.js running and it is connected to mongodb. I am trying to print it out in textfile or even to console. My database is small right now, and I just wanted to test the…
Nick
  • 195
  • 1
  • 3
  • 13
1
vote
1 answer

each data in mongodb local.oplog.rs, is it a standard bsonobject structure

I use spark mongo-connector to sync data from mongodb collection to hdfs file, my code works fine if the collection is read through mongos, but when it comes to local.oplog.rs, a replica collection only could be read through mongod, it gives me…
MayI
  • 53
  • 1
  • 9
1
vote
1 answer

Unable to query Oplog in mongoose

I am querying mongo oplog in MongoLabs mongoDb. As Mongolabs doesn't allow one to create user for local, I created an oplog-reader in admin but it throws error showing that it is unauthorised: Code snippet: var oplogURL =…
Shipra
  • 1,259
  • 2
  • 14
  • 26
1
vote
1 answer

Meteor alternatives for observing mongo changes

I like how Meteor observe and observeChanges methods work. The problem is I use it on a background and need to have only one instance that observes and modifies data. Also it's hungry on CPU resources. My observers perform jobs on specific…
ZuzEL
  • 12,768
  • 8
  • 47
  • 68
0
votes
0 answers

Why has oplog size in mongodb been reset?

I am working with a replica set on MongoDB. Therefore I have increased the oplog size, since it fit the use case. However, I have noticed after a couple of months that it has been reset at some point of time. Does anyone know when this can…
m-schie
  • 1
  • 1
0
votes
0 answers

Disabling Stats Collection from local.oplog.rs in MongoDB Ops Manager 5.0.x

I am currently using MongoDB Ops Manager version 5.0.x for monitoring and managing my MongoDB deployments. I noticed that Ops Manager collects a significant amount of data from local.oplog.rs, which is causing some load on my system. I am interested…
telion
  • 1
  • 2
0
votes
1 answer

Set MongoDB OpLog to ignore a collection

Our workflow includes a collection used for caching, with intensive WR ops that hammers the OpLog window across the whole cluster. Is it possible to tell the OpLog to ignore this collection? NOTE: Being a cache collection for a backend service, the…
C. Claudio
  • 177
  • 13
0
votes
0 answers

How to convert date from Linux to MongoDB timestamp and mongodump

I want to convert linux date into mongodb timestamp TODAY= date '+%Y-%m-%d%H:%M:%S' into this $date:"2023-04-09T16:27:54.282Z" So I can use same date in my dump query First I want to get yesterday date (todays date minus one day) TODAY= date…
0
votes
0 answers

MongoDB Slow Query Log Analysis

I got a MongoDB slow log, seem like it's not the biz logic problem, it's got a name space called 'somedatabase.$cmd', and 's' = 'I', seems like MongoDB was inserting some record to it's internal database, I was wondering what would cause this slow…
0
votes
2 answers

What does it mean when the operation of an oplog just has the id?

I am investigating an issue where some data seems to be disappearing and while looking at the oplog of a certain document that fell in the scenario I noticed a weird operation and I am not sure what it means. { lsid: { id: new UUID("foo"), …
0
votes
2 answers

Mongodb replicaset and oplog size

I want to check my replicasets are working properly or not while oplog size is over(minimum 990 mb). How can I convert a standalone remote server to replica set. How can I fixed the oplogsize of replica set. How can I check my replicasets are…
0
votes
1 answer

To find Oplog size using python

How to find oplog size in mongodb using python? For example : replGetSetStatus is equivalent to rs.status() Is there any similar command to find rs.printReplicationInfo() uri = "mongodb://usernamen:password@host:port/admin" conn =…
0
votes
1 answer

MongoDb Primary Oplog one hour behing realtime

Since in my country the time was changeg to one hour "ahead". My replica set is doing something I can't understand. This is a 4.2 version and P-S-S replica set. The Primary oplog is registering actions with the wrong time, it would register 8:00 for…
Kakumei
  • 3
  • 1
0
votes
1 answer

Cannot use timestamp from oplog for filtering

I have a stream of oplog messages produced by MongoDB Kafka connector. I want to tell the connector to start producing messages from a given point in time. I can do it using pipelines [documented…
kabanek
  • 303
  • 3
  • 18
0
votes
1 answer

In MongoDB ReplicaSet, does a priority 0 node (hidden, delayed, etc) have to have the same Oplog size as the nodes that can become primary?

I understand the Oplog collection in MongoDB replica set. A bigger Oplog means a bigger recovery window when a data bearing node goes down. However for nodes that can never be primary, is the Oplog size important? The rule to recover a node that…
FCR
  • 1,103
  • 10
  • 25