[SERVER-34898] Test that read concern majority is respected on secondaries in getMore Created: 08/May/18  Updated: 29/Oct/23  Resolved: 17/May/18

Status: Closed
Project: Core Server
Component/s: Querying, Replication
Affects Version/s: None
Fix Version/s: 4.0.0

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File read_majority_from_secondary.js    
Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-05-21
Participants:
Linked BF Score: 18

 Description   

We set shouldReadAtLastAppliedTimestamp on the recovery unit in db_raii.cpp (AutoGetCollectionForRead) before we know what the correct readConcern is, then we fail to reset it when we get the correct readConcern from the cursor. This applies to both the getMore command and the OP_GETMORE wire protocol read.



 Comments   
Comment by Githook User [ 17/May/18 ]

Author:

{'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile', 'name': 'Tess Avitabile'}

Message: SERVER-34898 Test that read concern majority is respected on secondaries in getMore
Branch: master
https://github.com/mongodb/mongo/commit/b39840f4aa7e20a9f10f858e127ede010f1de73a

Comment by Tess Avitabile (Inactive) [ 16/May/18 ]

This was fixed by this commit. I will change this ticket to be about adding test coverage.

Comment by Matthew Russotto [ 09/May/18 ]

It's a 4.0 regression; we incorrectly set both shouldReadAtLastAppliedTimestamp and readConcern majority in getMore, but that didn't make any difference until we started using that combination to mean "speculative majority".

 

Comment by Spencer Brody (Inactive) [ 08/May/18 ]

matthew.russotto, is this a regression in 4.0, or does this apply to 3.6 and earlier also?  If it's existed for a while I'm pretty surprised we haven't caught it before.

Comment by Matthew Russotto [ 08/May/18 ]

Added repro script, which should be put in as a replset test.

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