[SERVER-70365] Fix data race in setting/getting the logical session ID Created: 07/Oct/22  Updated: 05/Dec/22  Resolved: 10/Oct/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Celina Tala Assignee: Backlog - Replication Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-69152 Introduce better concurrency control ... Closed
Assigned Teams:
Replication
Operating System: ALL
Participants:
Linked BF Score: 11

 Description   

The reading thread in kill_sessions_common.cpp does acquire the client lock to access the logical session id on opCtx, the writing thread in transaction_oplog_application does not. As a result, we may have a read after write data race while accessing the logical session id.

A potential suggestion would be for the writing thread to also acquire the client lock before setting the logical session id.



 Comments   
Comment by Opal Hoyt [ 10/Oct/22 ]

celina.tala@mongodb.com looks like this is a dupe of https://jira.mongodb.org/browse/SERVER-69152 that we assigned to Service Architecture 

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