[SERVER-85539] Make getInReplicationRecovery service context decorator atomic Created: 22/Jan/24  Updated: 23/Jan/24  Resolved: 23/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Ali Mir Assignee: Ali Mir
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-82619 inReplicationRecovery flag recursive ... Open
Backwards Compatibility: Fully Compatible
Sprint: Repl 2024-02-05
Participants:
Linked BF Score: 135

 Description   

As seen in BF-31512, usage of the `inReplicationRecovery` function can produce data races as it accesses an underlying `bool` decorator on the service context. We should make the decorator atomic to avoid these data races.

Note that this ticket is makred related to SERVER-82619. We considered doing this fix in that ticket, but due to the simplicity of the fix here, we opted to do them in separate tickets.



 Comments   
Comment by Githook User [ 23/Jan/24 ]

Author:

{'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}

Message: SERVER-85539 Make getInReplicationRecovery service context decorator atomic

GitOrigin-RevId: 76a922c1ba766c7d83737df86e8e9812580ee731
Branch: master
https://github.com/mongodb/mongo/commit/c1764a0c662ba5d59cc4b5ab13b8c132bf7b43f6

Generated at Thu Feb 08 06:57:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.