[SERVER-35792] ChunkSplitStateDriver::prepareSplit should atomically swap bytesWritten value Created: 25/Jun/18  Updated: 29/Oct/23  Resolved: 26/Jun/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.1

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2018-07-02
Participants:

 Description   

As is, we stash the value for bytes written and then call clearBytesWritten, but if the value changes between those two calls due to a write in another thread, we'll lose some bytes. We should modify it to do this operation atomically.



 Comments   
Comment by Githook User [ 26/Jun/18 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}

Message: SERVER-35792 Make ChunkSplitStateDriver::prepareSplit atomically swap bytes written in the ChunkWritesTracker
Branch: master
https://github.com/mongodb/mongo/commit/68953e42038305d6ed83f3614d43a7fd4fc897c9

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