[DOCS-12065] Inconsistency in Read Concern "majority" Documentation Created: 19/Sep/18  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Parth Upadhyay Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-09-18 at 17.27.01.png    
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

Description

Hello,

I was trying to understand better how to ensure "read your own writes" consistency when using mongo db, and I believe there may be a mistake on this documentation page: https://docs.mongodb.com/manual/reference/read-concern-majority/#read-your-own-writes

 

Specifically, the page says this when talking about "read your own writes" consistency:

Prior to MongoDB 3.6, you must have issued your write operation with [{{

Unknown macro: { w}

}}|https://docs.mongodb.com/manual/reference/write-concern/#writeconcern.%22majority%22] write concern and then use either "majority" or "linearizable" read concern for the read operations to ensure that a single thread can read its own writes.

 

However, this information seems to be contradicted by the example provided on the same page about reads with concern `majority` done against the primary or secondaries: (https://docs.mongodb.com/manual/reference/read-concern-majority/#example). Specifically, the example shows this diagram:

The diagram shows, at a high level, that even after a write with `majority` concern is acknowledged, there is a period of time where secondaries may return the old value. So even after the write with `majority` concern is acknowledged at t3, a subsequent read with concern `majority` made to either secondary at t4 would still return an old value (Write_prev). This seems to be in contradiction with the quoted statement above.

If the statement was amended to include that read operations must be made to the primary, I believe it would become correct (and actually, older versions of the documentation seem to have some reference to primary: https://docs.mongodb.com/v3.4/reference/read-concern/#read-your-own-writes)

 

I apologize if I'm misunderstanding the documentation! Any guidance would be appreciated.

 

Thanks,

-parth

 

 

 

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 08:04:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.