C100DBA认证讲解 MongoDB replication 原理
题目正文:
which of following is true of mechanics of replication in MongoDB?
- Clients read from nearest member of a replica set by default
- Members of a replica set may replicate data from any other data-bearing member of set .
- Operations on the primary are recorded in a capped collection called oplog
翻译:
下面关于Mongodb的replication复制技术细节描述正确的是?
- 复制集成员会默认从复制集中最近的成员哪里读取数据
- replica set 复制集中的成员可能从其他任何承载数据的节点上复制数据
- 在primary上的操作将会被记录到一个capped collection(受限集合)中称之为oplong
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 buildIndexessetting.
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 thelocal.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是正确的。
Leave a Reply