M102 WEEK 5 QUIZ

Question: Which of the following statements are true about reconfiguring a replica set?   Check all that apply.

  1. The reconfiguration will always trigger an election
  2. The reconfiguration required the mongod servers to be restarted
  3. Servers can be either removed from teh replica set, or added (Ans)
  4. If a member of the replica set is not avialable, the replica set can still be reconfigured. (Ans)

Question: When might you want to use an arbiter?   Check all that apply.

  1. To make an odd number of votes int eh replica set (Ans)
  2. To spread the replica set over more dataceters (Ans)
  3. To help in disaster recovery
  4. To protect against network splits (Ans)
  5. To query aggregation batch jobs

Question :Which values are valid “priority” values in a replia set configuration? Check all that apply.

  1. (Ans)
  2. -1
  3. 500 (Ans)
  4. 88.4 (Ans)
  5. 88 (Ans)

Question: In which of the following scenarios does it make sense to use slave delay? Check all that apply.

  1. Prevent against a new client application release bug (Ans)
  2. During development when using experimental queries (Ans)
  3. For scaling the number of writes a replica set can handle
  4. For prduction level-live data queries
  5. As the primary backup

Question: Generally, is it typical for servers to have different vote counts?

  • Yes
  • No (Ans)

Question : Imagine you’re using a 5-server replica set and you have critical inserts which you do not want the potential for a rollback to happen. You also have to consider that secondaries may be taken down from to time for maintenance, leaving you with a potential 4-server replica set. Which write concern is best suited for these critical inserts?

  1. w=0
  2. w=1
  3. w=majority (Ans)
  4. w=2
  5. w=3

Question: Write Concern is set at the DB level and every operation on this DB must use the same Write Concern:

  • True
  • False (Ans)

Question: For getLastError / WriteConcern with w=3, if you have an arbiter, it counts as one of the 3.

  • True
  • False (Ans)

Question: Does getLastError() need to be called if using default Write Concerns?

  • Yes
  • No (Ans)

Question: What are some issues with using wtimeout? Check all that apply.

  1. A write can be made but getLastError() could reprot a failure (Ans)
  2. Each query coud potentially take the full duration of the wtimeout (Ans)
  3. Pile-ups of connections (Ans)
  4. Requests could hand indefinitely
  5. Doesn’t work with replica sets

Question: Using the following output from ls -R, which directories house the data files for a WiredTiger mongod process?

$ ls -R
A                               C                               mongodA.log.2015-04-08T23-26-14 mongodB.log.2015-04-08T23-26-24 mongodC.log.2015-04-08T23-26-18
B                               mongodA.log                     mongodB.log                     mongodC.log

./A:
WiredTiger                          WiredTiger.wt                       collection-4-4315177254347078174.wt index-3-4315177254347078174.wt      mongod.lock
WiredTiger.basecfg                  _mdb_catalog.wt                     collection-6-4315177254347078174.wt index-5-4315177254347078174.wt      sizeStorer.wt
WiredTiger.lock                     collection-0-4315177254347078174.wt collection-7-4315177254347078174.wt index-8-4315177254347078174.wt      storage.bson
WiredTiger.turtle                   collection-2-4315177254347078174.wt index-1-4315177254347078174.wt      journal

./A/journal:
WiredTigerLog.0000000001     WiredTigerPreplog.0000000001

./B:
_tmp         journal      local.0      local.1      local.ns     mongod.lock  storage.bson test.0       test.ns

./B/_tmp:

./B/journal:
j._0 lsn

./C:
WiredTiger                          _mdb_catalog.wt                     collection-7-6008883041206081919.wt index-5-6008883041206081919.wt      storage.bson
WiredTiger.basecfg                  collection-0-6008883041206081919.wt collection-9-6008883041206081919.wt index-8-6008883041206081919.wt
WiredTiger.lock                     collection-2-6008883041206081919.wt index-1-6008883041206081919.wt      journal
WiredTiger.turtle                   collection-4-6008883041206081919.wt index-10-6008883041206081919.wt     mongod.lock
WiredTiger.wt                       collection-6-6008883041206081919.wt index-3-6008883041206081919.wt      sizeStorer.wt

./C/journal:
WiredTigerLog.0000000001     WiredTigerPreplog.0000000001
  1. A (Ans)
  2. B
  3. C (Ans)

As directories A and C have WiredTiger data files, while directory B don’t, A and C stores WiredTiger data files.

Leave a Reply

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