This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Master Slave Replication”.
1. Which of the following members should be hidden?
a) Delayed
b) Hidden
c) Primary
d) All of the mentioned
View Answer
Explanation: Use hidden members for dedicated tasks such as reporting and backups.
2. Point out the wrong statement.
a) Clients will not distribute reads with the appropriate read preference to hidden members
b) Hidden members cannot vote in replica set elections
c) If you stop a voting hidden member, ensure that the set has an active majority or the primary will step down
d) None of the mentioned
View Answer
Explanation: Hidden members may vote in replica set elections
3. __________ operations cannot guarantee that the data files do not change.
a) db.lockl()
b) db.synclock()
c) db.fsyncUnlock()
d) secondary
View Answer
Explanation: As a result, do not use these methods to ensure consistency for the purposes of creating backups.
4. _______ may block reads, including those necessary to verify authentication.
a) db.lockall()
b) db.fsyncLock()
c) db,lockreads()
d) none of the mentioned
View Answer
Explanation: Such reads are necessary to establish new connections to a mongod that enforces authorization checks.
5. Point out the correct statement.
a) In MongoDB, clients cannot see the results of writes before they are made durable
b) Users may configure read preference on a per-connection basis to prefer that the read operations return results from the secondary members
c) Clients cannot read data which may be subsequently rolled back
d) None of the mentioned
View Answer
Explanation: If clients configure the read preference to permit secondary reads, read operations can return data from secondary members that have not replicated more recent write operations.
6. ________ unlocks a mongod instance to allow writes and reverses the operation of a db.fsyncLock() operation.
a) db.fsyncUnlock()
b) db.fsynclock()
c) db.syncUnlock()
d) secondary
View Answer
Explanation: Typically you will use db.fsyncUnlock() following a database backup operation.
7. Delayed members are a ________ or a running “historical” snapshot of the data set.
a) “rolling backup”
b) “roll backup”
c) “rolling commit”
d) none of the mentioned
View Answer
Explanation: They may help you recover from various kinds of human error.
8. Delayed members apply operations from the _______ on a delay.
a) oplog
b) log
c) mlog
d) none of the mentioned
View Answer
Explanation: Always prevent applications from seeing and querying delayed members.
9. In sharded clusters, delayed members have limited utility when the __________ is enabled.
a) Balancer
b) Collector
c) Emitter
d) None of the mentioned
View Answer
Explanation: Delayed members replicate chunk migrations with a delay.
10. A delayed member has its priority equal to 0 and hidden equal to ___________
a) 0
b) flase
c) true
d) all of the mentioned
View Answer
Explanation: When you configure a delayed member, the delay applies both to replication and to the member’s oplog.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Check MongoDB Books
- Practice Programming MCQs
- Apply for Programming Internship
- Check Information Technology Books