MongoDB DBA · Question 405 · Multiple choice

Consider a replica set with 3 healthy data bearing nodes of equal priority and no arbiters. Which of the following will cause a failover event or trigger an election for a new primary? Check all that apply:

Answer options

  1. A.
    A network partition between the primary and the other nodes
  2. B.
    rs.status()
  3. C.
    rs.stepDown() A rolling version upgrade of the current primary node
  4. D.
    rs.freeze()

Answer confidence: Medium

Correct answer: A, C

Explanation language: Chinese

主节点与其余节点网络分区后,剩下的多数派(2/3)会选出新主,属典型 failover;rs.stepDown() 主动让位、以及滚动升级中让主节点让位的步骤同样会触发选举,所以选 A 与 C(C 这一项在源文件里把 rs.stepDown() 与 “A rolling version upgrade of the current primary node” 合并成了一项,两者都会触发选举)。rs.status() 只是查询状态;rs.freeze() 的设计目的是让成员在一段时间内不参选,不是主动触发选举——流传的两份答案键在 freeze 上彼此矛盾,故本条判 medium。

Papers containing this question

This question appears in 2 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 ↗