[SERVER-55443] Lock free read using linearizable read concern fasserts when issued to primary not yet accepting writes Created: 23/Mar/21  Updated: 29/Oct/23  Resolved: 01/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-04-05
Participants:
Linked BF Score: 19

 Description   

A lock free read using linearizable read concern that runs concurrently with replication step up causes an fassert here: https://github.com/mongodb/mongo/blob/06a96bad7c0c5413b785776b5d0e51d436ecc958/src/mongo/db/db_raii.cpp#L300-L303

 

The read source will be left unchanged as it is not modified for linearizable read concern but the flag that indicates that an update is needed it set because the node is not accepting writes yet. 

https://github.com/mongodb/mongo/blob/06a96bad7c0c5413b785776b5d0e51d436ecc958/src/mongo/db/db_raii.cpp#L257-L264

 



 Comments   
Comment by Githook User [ 01/Apr/21 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-55443 Do not report that read source need to be changed to lastApplied for linearizable read concern
Branch: master
https://github.com/mongodb/mongo/commit/30cc6087d4c7ac530ba38611382082707f123c25

Generated at Thu Feb 08 05:36:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.