MongoDB DEV · Question 107 · 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.
    rs.stepDown()
  2. B.
    A rolling version upgrade of the current primary node
  3. C.
    rs.status()
  4. D.
    A network partition between the primary and the other nodes
  5. E.
    rs.freeze()

Answer confidence: High

Correct answer: A, B, D

Explanation language: Chinese

rs.stepDown() 会主动让出 primary,对当前主节点做滚动版本升级也必然先让它下线/降级,两者都会触发重新选举;而主节点与其他节点之间发生网络分区时,主节点失去多数派联系会降级为 secondary,剩余节点选出新主,同样是 failover。C 的 rs.status() 只是只读查询状态,E 的 rs.freeze() 只让节点在一段时间内不参与竞选(维护时通常还要再配合 rs.stepDown() 才会真正降级),二者都不会触发选举。

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 ↗