C100DBA认证讲解 MongoDB replication 原理
题目正文:
which of following is true of mechanics of replication in MongoDB?
翻译:
下面关于Mongodb的replication复制技术细节描述正确的是?
Replica set members replicate data continuously after the initial sync. This process keeps the members up to date with all changes to the replica set’s data. In most cases, secondaries synchronize from the primary.
http://docs.mongodb.org/manual/core/replica-set-sync/
==>默认情况下从Primary同步数据,而不是复制集中最近的成员
For a member to sync from another, both members must have the same value for the buildIndexes setting.
Beginning in version 2.2, secondaries avoid syncing from delayed members and hidden members .
从2.2开始secondaries会避免从延迟成员和隐藏成员哪里同步数据,所以复制集中的成员可能从其他任何承载数据的节点上复制数据是错误的
The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. MongoDB applies database operations on the primary and then records the operations on the primary’s oplog. The secondary members then copy and apply these operations in an asynchronous process. All replica set members contain a copy of the oplog, in the local.oplog.rs collection, which allows them to maintain the current state of the database.
http://docs.mongodb.org/manual/core/replica-set-oplog/
选项Operations on the primary are recorded in a capped collection called oplog是正确的。