Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB C100DBA Exam - Topic 7 Question 137 Discussion

Posted by Nguyet on Oct 30, 2026 at 09:05 AM

What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?

Suggested Answer: C

The supported mongosh helpers for replica-set membership changes are rs.remove() and rs.add(). rs.remove(hostname) removes the member whose host string matches the supplied host:port, while rs.add() adds a new member using either a host string or a member configuration document that includes a host field. Option C uses those documented methods in the required sequence: remove node 1, remove node 2, then add node 1 back. The names rs.removeNode() and rs.addNode() shown in the other options are not standard MongoDB replica-set helper methods. Membership changes must be performed carefully because modifying voting or data-bearing membership can affect majority calculations, elections, and availability. Administrators normally execute membership changes while connected to the current primary, allow configuration propagation, and verify replica-set health afterward with rs.status() or related diagnostics. If a removed data-bearing node is later re-added, it may need to synchronize depending on how far its data has diverged from the current replica-set history. Among the choices, option C is the only valid command sequence.

Study Guide reference/topic:Cluster Reliability and Data Resilience - replica-set membership, rs.remove(), rs.add(), and topology changes.

===========


Get Premium C100DBA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
0 comments · newest first

Currently there are no comments in this discussion, be the first to comment!

0/2000 characters

Save Cancel