Mongodb Certified Developer Associate C100dev · Free Practice Question Medium

Question 34

Your application uses MongoDB as its primary database and handles financial transactions. Due to the critical nature of these transactions, you decide to configure MongoDB's read concern level to ensure the consistency of data reads. Which of the following read concern levels would you choose if your application requires reading the most recent majority-committed data, even under network partitions or replica set elections?

  • A

    "local"

  • B

    "snapshot"

  • C

    "available"

  • D

    "majority"

Reveal correct answer

Correct answer: D

A.

This read concern level allows reading data from the primary or secondary and does not ensure that the data is majority-committed. This means it may return data that might be rolled back and is not suitable for applications that require consistent reads

B.

The "snapshot" read concern allows consistent reads of data at a single point in time across multiple transactions in a sharded cluster. It doesn't ensure reading the most recent majority-committed data.

C.

The "available" read concern is the default for reads from replica set secondary members. It does not guarantee that the returned data has been confirmed by a majority of the replica set members and could return data that is uncommitted or might be rolled back in the future.

D.

The "majority" read concern ensures that the returned data has been confirmed by a majority of the replica set members. It guarantees that the data will not be rolled back under normal circumstances and is ideal for applications that require consistent reads.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need