Home
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 16
Choose a topic to test your knowledge and improve your MongoDB skills
1. ____ sets the member that this replica set member will sync from, overriding the default sync target selection logic.
rs.reconfig()
rs.remove()
rs.stepDown()
rs.syncFrom()
2. rs.reconfig() provides a wrapper around the ___________ command.
replSetfinalReconfig
replSetReconfig
replSetReconfiguration
None of the mentioned
3. _____ sets the slaveOk property for the current connection.
rs.reconfig()
rs.slaveOk()
rs.stepDown()
rs.slave()
4. Before mongod creates an oplog, you can specify its size with the __________ option.
oplogSizeMB
oplogSizeGB
opSizeMB
All of the Mentioned
5. Before mongod creates an oplog, you can specify its size with the __________ option.
oplogSizeMB
oplogSizeGB
opSizeMB
All of the Mentioned
6. Point out the wrong statement.
The oplog is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases
MongoDB applies database operations on the primary and then records the operations on the primary’s oplog
The primary members then copy and apply these operations in an asynchronous process
None of the mentioned
7. The oplog must translate multi-updates into individual operations in order to maintain ______
availability
idempotency
scalability
Secondary
8. Use _________ from a secondary member and the replication status output to assess the current state of replication.
db.getReplInfo()
db.getReplicationInfo()
rs.printReplicationInfo()
none of the mentioned
9. Point out the correct statement.
To facilitate replication, all replica set members send heartbeats (pings) to all other members
For proper replication operations, entries in the oplog must be idempotent
Any member can import oplog entries from any other member
Any member can import oplog entries from any other member
10. For a member to sync from another, both members must have the same value for the _________ setting.
buildIndexes
getIndexes
buildpriIndexes
Secondary
11. Secondaries apply operations from the primary asynchronously to provide __________ consistency
strict
strong
eventual
None of the mentioned
12. When ______________ is true, the mongod instance saves all documents migrated from the shard to the moveChunk directory of the storage.dbPath.
sharding.archiveChunks
sharding.archiveMovedChunks
shards.archiveMovedChunks
rs.syncFrom()
13. Replication _______ is a delay between operation on the primary and the application of that operation from the oplog to the secondary.
lag
delay
latency
none of the mentioned
14. A delayed member may show as 0 seconds behind the primary when the inactivity period on the primary is greater than the ________ value.
slaveDelayTime
slaveDelay
slaveTime
rs.slave()
15. ______ shut down the mongod instance for one of the non-primary members of your replica set.
db.shutdown()
db.shutdownServer()
db.shutServer()
All of the Mentioned
16. Point out the wrong statement.
To change the size of the oplog, you must perform maintenance on each member of the replica set in turn
Always start rolling replica set maintenance with the secondaries, and finish with the maintenance on primary member
The oplog exists internally as a capped collection
None of the mentioned
17. To finish the rolling maintenance operation, step down the primary with the _________ method.
rs.syncFrom()
rs.stepDown()
rs.synchrepl()
Secondary
18. You also can force a member never to become primary by setting its priority value to ______
1
2
3
0
19. Point out the correct statement.
Replica sets allow a MongoDB deployment to remain available during the majority of a maintenance window
Always start mongod with the same user, even when restarting a replica set member as a standalone instance
The secondary takes time to catch up to the primary
All of the mentioned
20. A replica set member becomes _________ when its replication process falls so far behind that the primary overwrites oplog entries the member has not yet replicated.
stale
state
dead
Secondary
21. During initial sync, mongod will remove the content of the _______
dbPathSync
Path
dbPath
None of the mentioned
22. You cannot use a _________backup for the data files, only a snapshot backup.
mongorestore
mongodump
bsondump
rs.syncFrom()
23. You can use the ________ setting in Replica Set Configuration to disable chained replication for situations where chained replication is causing lag.
chainingAllowed
chainingDisAllowed
chainingAllow
None of the mentioned
24. For most replica sets, the hostnames in the _________ field never change.
tag
host
rs
None of the mentioned
25. ______ returns a document that reports on the status of the replica set.
replSetGetStatus
replSetFreeze
replSetInitiate
All of the Mentioned
26. ______ enables or disables a maintenance mode, which puts a secondary node in a RECOVERING state.
replSetReconfig
replSetMaintenance
replSetStepDown
All of the Mentioned
27. Point out the correct statement.
To affect the sync target for the initial sync, run rs.syn() operation before initial sync
If you run rs.syncFrom() during initial sync, MongoDB produces no error messages
replSetSyncFrom and rs.syncFrom() provide a permanent override of default behavior
All of the Mentioned
28. When enabled replSetMaintenance: true, the member enters the ________ state.
REPLICATING
RECOVERING
STALE
All of the Mentioned
29. _____ applies a new configuration to an existing replica set.
replSetReconfig
replSetMaintenance
replSetStepDown
All of the Mentioned
30. Which of the command is for master-slave replication only?
replSetSyncFrom
resync
applyOps
isMaster
31. ____ is an internal command that applies oplog entries to the current data set.
replSetSyncFrom
resync
applyOps
isMaster
32. ________ explicitly override the default logic for selecting a member to replicate from.
replSetSyncFrom
resync
applyOps
isMaster
33. The ________ settings of replica set members affect the outcomes of elections for primary.
priority
replication
Initiate
All of the Mentioned
34. Point out the correct statement.
The value of the member’s priority setting determines the member’s priority in elections
The default value for the priority field is 3
The value of priority can be any floating point (i.e. decimal) number between 0 and 500
None of the mentioned
35. To modify priorities, you update the members _________ in the replica configuration object.
array
tag
mdimarray
All of the Mentioned
36. The _________ shell method can force the current primary to step down, which causes an election.
rs.repliconfig()
rs.config()
rs.reconfig()
All of the Mentioned
37. Point out the wrong statement.
Before an election the primary opens all open client connections
To block a member from seeking election as primary, assign it a priority of 0
Hidden members, delayed members, and arbiters all have priority set to 0
All of the mentioned
38. If the oplog is shorter than the slaveDelay window, the _______ member cannot successfully replicate operations.
hidden
delayed
priority
All of the Mentioned
39. _______ members allow you to add additional members for read distribution beyond the maximum seven voting members.
Voting
Non-voting
Priority
All of the Mentioned
40. Remove the secondary from the replica set by calling ___________ method.
rs.removeRepli()
rs.remove()
rs.removeset()
isMaster
41. ____ returns basic help text for replica set functions.
rs.printSlaveReplicationInfo()
rs.printReplication()
rs.help()
All of the Mentioned
42. _______ prints a report of the status of the replica set from the perspective of the secondaries.
rs.printSlaveReplicationInfo()
rs.printReplication()
rs.help()
None of the mentioned
43. MongoDB uses _________ to support deployments with very large data sets and high throughput operations.
sharding
replication
replica sets
All of the Mentioned
44. Point out the correct statement.
High query rates can exhaust the CPU capacity of the server
Database systems with small data sets and high throughput applications can challenge the capacity of a single server
Smaller data sets exceed the storage capacity of a single machine
All of the mentioned
45. How many types of sharding exist in MongoDB?
1
2
3
All of the Mentioned
46. ____ scaling adds more CPU and storage resources to increase capacity.
Horizontal
Vertical
Partition
All of the mentioned
47. Point out the wrong statement.
Scaling by adding capacity do not have limitations.
cloud-based providers may only allow users to provision smaller instances
There is a practical maximum capability for vertical scaling
All of the mentioned
48. ____ divides the data set and distributes the data over multiple servers, or shards.
Vertical
Sharding
Partition
All of the Mentioned
49. MongoDB supports sharding through the configuration of a sharded ______
shapes
clusters
sets
All of the Mentioned
50. How many components are present in sharded cluster?
1
2
3
4
Submit