250+ TOP MCQs on Member Configuration and Answers

MongoDB Multiple Choice Questions on “Member Configuration”.

1. The ________ settings of replica set members affect the outcomes of elections for primary.
a) priority
b) replication
c) Initiate
d) all of the mentioned

Answer: a
Clarification: Use this setting to ensure that some members are more likely to become primary and that others can never become primary.

2. Point out the correct statement.
a) The value of the member’s priority setting determines the member’s priority in elections
b) The default value for the priority field is 3
c) The value of priority can be any floating point (i.e. decimal) number between 0 and 500
d) None of the mentioned

Answer: a
Clarification: The higher the number, the higher the priority.

3. To modify priorities, you update the members _________ in the replica configuration object.
a) array
b) tag
c) mdimarray
d) all of the mentioned

Answer: a
Clarification: The array index begins with 0. Do not confuse this index value with the value of the replica set member’s _id field in the array.

4. The _________ shell method can force the current primary to step down, which causes an election.
a) rs.repliconfig()
b) rs.config()
c) rs.reconfig()
d) all of the mentioned

Answer: c
Clarification: When the primary steps down, the mongod closes all client connections.

5. Point out the wrong statement.
a) Before an election the primary opens all open client connections
b) To block a member from seeking election as primary, assign it a priority of 0
c) Hidden members, delayed members, and arbiters all have priority set to 0
d) All of the mentioned

Answer: a
Clarification: Reconfiguring priority can force the current primary to step down, leading to an election.

6. If the oplog is shorter than the slaveDelay window, the _______ member cannot successfully replicate operations.
a) hidden
b) delayed
c) priority
d) all of the mentioned

Answer: b
Clarification: The length of the secondary slaveDelay must fit within the window of the oplog.

7. _________ members allow you to add additional members for read distribution beyond the maximum seven voting members.
a) Voting
b) Non-voting
c) Priority
d) all of the mentioned

Answer: b
Clarification: To configure a member as non-voting, set its votes value to 0.

8. Remove the secondary from the replica set by calling ___________ method.
a) rs.removeRepli()
b) rs.remove()
c) rs.removeset()
d) isMaster

Answer: b
Clarification: rs.remove() removes the member described by the hostname parameter from the current replica set.

9. ______ returns basic help text for replica set functions.
a) rs.printSlaveReplicationInfo()
b) rs.printReplication()
c) rs.help()
d) all of the mentioned

Answer: c
Clarification: rs.help() returns a basic help text for all of the replication related shell functions.

10. __________ prints a report of the status of the replica set from the perspective of the secondaries.
a) rs.printSlaveReplicationInfo()
b) rs.printReplication()
c) rs.help()
d) none of the mentioned

Answer: a
Clarification: rs.printSlaveReplicationInfo() returns a formatted report of the status of a replica set from the perspective of the secondary member of the set.

Leave a Reply

Your email address will not be published. Required fields are marked *