C100DBA MongoDB DBA认证考题讲解 Replica set secondary oplog elect

本文永久链接地址:http://www.askmaclean.com/archives/c100dba-mongodb-dba%e8%ae%a4%e8%af%81%e8%80%83%e9%a2%98%e8%ae%b2%e8%a7%a3-replica-set-secondary-oplog-elect.html

dbDao 百度贴吧:http://tieba.baidu.com/dbdao

MongoDB技术学习QQ群: 421431253

 

此题为单选题

 

Screen Shot 2015-04-28 at 10.45.40 PM

Given a Replica Set with five data-bearing members , suppose the primary goes down with operations in its oplog that have been copied to only one secondary.

 

Assuming no other problem occurs, which of the following describes what is most likely to happen?

 

  • The primary will rollback the operations once it recovers
  • The secondary with the most current oplog will be  elected primary
  • Missing operations will need to be manually added
  • The most current secondary will not rollback the operations following the election .
  • Reads will be stale until the primary comes back up.

 

 

  • The primary will rollback the operations once it recovers 是错误的因为 A rollback reverts write operations on a former primary when the member rejoins its replica set after a failover. A rollback is necessary only if the primary had accepted write operations that the secondaries had not successfully replicated before the primary stepped down.

 

If a higher-priority member catches up to within 10 seconds of the latest oplog entry of the current primary, the set holds an election in order to provide the higher-priority node a chance to become primary.

高优先级的且oplog延迟不超过10秒的节点成员有机会让replica set做election 使其成为primary。

答案应为

  • The most current secondary will not rollback the operations following the election .

 

此条目发表在 未分类 分类目录。将固定链接加入收藏夹。

评论功能已关闭。