MongoDB DEV · Question 108 · Multiple choice

Which of the following are the recommended settings when first adding a brand new member to a replica set? Check all that apply:

Answer options

  1. A.
    rs.add( { host: HOST:PORT, priority: 1, votes: 0 } )
  2. B.
    rs.add( { host: HOST:PORT, priority: 1, votes: 1 } )
  3. C.
    rs.add( { host: HOST:PORT, priority: 0, votes: 0 } )

Answer confidence: High

Correct answer: C

Explanation language: Chinese

新成员刚加入时还没有同步完数据,推荐用 priority: 0、votes: 0 添加(priority: 0 保证它不会被选为 primary,votes: 0 保证这个“空节点”不影响原有投票多数派),等它追平数据后再按需调整。A、B 都给了它 priority 1,B 还给它投票权,会让数据尚未追平的节点有机会被选举为主或改变选举结果。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗