db.sample.updateMany( { y : { $gte : 10 } },{ $set : { y : 75 } } )

Big Data MongoDB in Big Data 3 years ago

  2   0   0   0   0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Every operation on the primary is logged in operation logs known as oplog. These oplogs are replicated to For a healthy replica set system, it is RECOMMENDED that all members are in sync with no replication lag. Data is first written on primary by the applications then replicated to secondary. This synchronization is important to MAINTAIN up-to-date copies of data on all members. Synchronization happens in 2 ways: initial sync and continuous replication.

  • Initial Sync: When we add new member to replica set data from one member is copied to the new member. When we perform an initial sync, MongoDB copies all databases one by one except the local database. This is done by scanning all collections in the source database and inserting them on a new member. All indexes are also copied during the initial syn. There MIGHT be changes to the data set when initial sync happens. At the end of copy, the changes from already copied collections are applied USING oplog.
  • Continuous Replication: After the initial sync the secondary members replicate data continuously. We can decide which member sync happens. The replication of secondary member from their sync source happens asynchronously. These replications happen using oplog.

Posted on 31 May 2022, this text provides information on Big Data related to MongoDB in Big Data. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Tuteehub forum answer Answers

Post Answer

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.