Home
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 15
Choose a topic to test your knowledge and improve your MongoDB skills
1. A replica set can have up to ______ members but only 7 voting members.
10
30
50
70
2. Which of the following may be non-voting or priority 0?
center
secondary
primary
None of the mentioned
3. If the current primary becomes unavailable, the replica set holds an ______ to choose which of the secondaries becomes the new primary.
election
replication
clasification
None of the mentioned
4. By default, an application directs its ____ operations to the primary member.
read
write
read write
All of the Mentioned
5. The architecture of a replica set affects the set’s _________ and capability.
scalability
capacity
performance
All of the Mentioned
6. Point out the wrong statement.
Even number of members ensures that the replica set is always able to elect a primary
Arbiters do not store a copy of the data and require fewer resources
You may run an arbiter on an application server or other shared process
none of the mentioned
7. The standard replica set deployment for production system is a ___-member replica set.
two
three
four
five
8. ____ for a replica set is the number of members that can become unavailable and still leave enough members in the set to elect a primary.
Fault tolerance
Reliability
Security
None of the mentioned
9. Point out the correct statement.
Removing a member to the replica set does not always increase the fault tolerance
The secondary is the only member in the replica set that receives write operations
Fault tolerance is an effect of replica set size, but the relationship is not direct
None of the mentioned
10. Without a primary, a replica set cannot accept ________ operations.
read
write
read write
All of the Mentioned
11. ______ member is used to support dedicated functions, such as backup or reporting.
Hidden
Primary
ViewState
None of the mentioned
12. To protect your data if your main data center fails, keep at least _______ member in an alternate data center.
one
two
three
None of the mentioned
13. What should be the priority of member to prevent them from becoming primary?
0
1
2
3
14. ______ sets also allow the routing of read operations to specific machines.
Field
Read
Tag
All of the Mentioned
15. Replica sets provide high availability using automatic ________
failover
replication
failure
All of the Mentioned
16. Point out the wrong statement.
When the primary rejoins the set as a secondary, it reverts, or “rolls back,” its write operations to maintain database consistency with the other members
A rollback is necessary only if the primary had accepted write operations that the secondaries had not successfully replicated before the primary stepped down
MongoDB attempts for rollbacks, which should be rare
None of the mentioned
17. Failover allows a ________ member to become primary if primary is unavailable.
Hidden
Primary
ViewState
Secondary
18. Sometimes the failover process may require a ____________ during operation.
savepoint
rollback
commit
None of the mentioned
19. Point out the correct statement.
A rollback does not occur if the write operations replicate to another member of the replica set before the primary steps down
Secondaries that can not keep up with the throughput of operations on the former primary, decrease the size and impact of the rollback
Fault tolerance is an effect of replica set size, but the relationship is not direct
None of the mentioned
20. MongoDB writes the rollback data to BSON files in the rollback/ folder under the database’s ________ directory.
dbPath
logPath
dataPath
All of the Mentioned
21. The names of rollback files have the following form.
<database>.<collection>.<timestamp>.bson.
<database>.<collection>.<tp>.bson.
<database>.<collection>.<timestamp>.json.
None of the mentioned
22. ______ is used to read the contents of the rollback files.
bsondumpdata
bsondp
bsondump
None of the mentioned
23. Use ______ to apply the changes to the new primary after rollback.
mongostore
mongorestore
restore
None of the mentioned
24. mongorestore recreates indexes recorded by _______
bsondump
mongodump
mongostore
All of the mentioned
25. The __________ of a replica set affects the outcome of failover situations.
deployment
architecture
structure
All of the Mentioned
26. Point out the wrong statement.
Administrators must apply or discard rollback data manually
Network partitions could not prevent the set from being able to form a majority
Replica sets remove “rollback” data when needed without intervention
None of the mentioned
27. A rollback reverts _______ operations on a former primary when the member rejoins the replica set after a failover.
read
write
view
Secondary
28. A priority __ member is a secondary that cannot become primary.
0
1
2
None of the mentioned
29. Point out the correct statement.
Elections does not occur when the primary becomes unavailable and the replica set members autonomously select a new primary
A priority 1 member maintains a copy of the data set, accepts read operations, and votes in elections
In a two-member replica set, in one data center hosts the primary and a secondary.
None of the mentioned
30. A second data center hosts one priority 0 member that cannot become _____
primary
write
view
Secondary
31. A ______ member maintains a copy of the primary’s data set but is invisible to client applications.
primary
delayed
hidden
none of the mentioned
32. The db.________ method does not display hidden members.
isPrima ry()
isMaster()
Master()
None of the mentioned
33. In a sharded cluster _______ do not interact with hidden members.
mongod
mongos
mongostore
All of the Mentioned
34. Which of the following members should be hidden?
Delayed
Hidden
Primary
All of the Mentioned
35. Point out the wrong statement.
Clients will not distribute reads with the appropriate read preference to hidden members
Hidden members cannot vote in replica set elections
If you stop a voting hidden member, ensure that the set has an active majority or the primary will step down
None of the mentioned
36. ______ operations cannot guarantee that the data files do not change.
db.lockl()
db.synclock()
db.fsyncUnlock()
Secondary
37. ___ may block reads, including those necessary to verify authentication.
db.lockall()
db.fsyncLock()
db,lockreads()
none of the mentioned
38. Point out the correct statement.
In MongoDB, clients cannot see the results of writes before they are made durable
Users may configure read preference on a per-connection basis to prefer that the read operations return results from the secondary members
Clients cannot read data which may be subsequently rolled back
None of the mentioned
39. ____ unlocks a mongod instance to allow writes and reverses the operation of a db.fsyncLock() operation.
db.fsyncUnlock()
db.fsynclock()
db.syncUnlock()
Secondary
40. Delayed members are a ________ or a running “historical” snapshot of the data set.
“rolling backup”
“roll backup”
“rolling commit”
None of the mentioned
41. Delayed members apply operations from the _______ on a delay.
oplog
log
mlog
None of the mentioned
42. In sharded clusters, delayed members have limited utility when the __________ is enabled.
Balancer
Collector
Emitter
None of the mentioned
43. A delayed member has its priority equal to 0 and hidden equal to ______
0
flase
true
All of the Mentioned
44. Which of the following ddds an arbiter to a replica set?
rs.addArb()
rs.addArbiter()
rs.addtoArb()
All of the Mentioned
45. Point out the wrong statement.
The rs.status() method is a wrapper that runs the replSetGetStatus database command
rs.freeze() provides a wrapper around the database command replSetFreeze
rs.init() initializes a new replica set
None of the mentioned
46. ______ prevents the current member from seeking election as primary for a period of time.
rs.freeze()
rs.conf()
rs.printReplicationInfo()
Secondary
47. ________ returns the replica set configuration document.
rs.freeze()
rs.conf()
rs.printReplicationInfo()
none of the mentioned
48. Point out the correct statement.
rs.printinfo() prints a formatted report of the replica set member’s oplog
The output of rs.printReplicationInfo() is identical to that of db.printReplicationInfo()
rs.printReplicationInfo() formats and prints the data returned by db.allReplicationInfo()
none of the mentioned
49. ____ prints a report of the status of the replica set from the perspective of the primary.
rs.freeze()
rs.printconf()
rs.printReplicationInfo()
Secondary
50. ____ re-configures a replica set by applying a new replica set configuration object.
rs.reconfig()
rs.remove()
rs.stepDown()
None of the mentioned
Submit