[SERVER-74263] Avoid data race in AdmissionContext Created: 22/Feb/23  Updated: 29/Oct/23  Resolved: 23/Feb/23

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

Type: Bug Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Jordi Olivares Provencio
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 2023-03-06
Participants:
Linked BF Score: 170

 Description   

AdmissionContext::Priority gets read by curOp. This can race against a simultaneous write by the operation that sets the priority. This is fine as at most curOp would report an old priority.

We should wrap the admission priority in an AtomicWord so that we explicitly tell TSAN that this is fine.



 Comments   
Comment by Githook User [ 23/Feb/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-74263 Avoid data race in AdmissionContext
Branch: master
https://github.com/mongodb/mongo/commit/5bbc6516dd4ba020e1ddc942773a1e6895ceec30

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