[SERVER-85884] Make Counters in MultiUpdateCoordinator Unit Test Atomic Created: 29/Jan/24  Updated: 02/Feb/24  Resolved: 02/Feb/24

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

Type: Bug Priority: Major - P3
Reporter: Brett Nawrocki Assignee: Brett Nawrocki
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: Cluster Scalability 2024-2-5
Participants:
Linked BF Score: 149

 Description   

TSAN complains that the counters in the MultiUpdateCoordinator test fixtures are concurrently read and written. These counters are incremented when MultiUpdateCoordinator starts or stops migrations and are read from the unit test. Since the instance should be paused while the unit test reads these values, I think this should be safe, but it's possible that TSAN doesn't have the context to realize that the failpoint is being used as synchronization here.

These counters should be made atomic so TSAN stops complaining, and if there really is a race in the test we'll see unit test failures due to an unexpected count.



 Comments   
Comment by Githook User [ 02/Feb/24 ]

Author:

{'name': 'Brett Nawrocki', 'email': 'brett.nawrocki@mongodb.com', 'username': 'brettnawrocki'}

Message: SERVER-85884 Make Counters in MultiUpdateCoordinator Unit Test Atomic

GitOrigin-RevId: 43a4e5c4ece2d05f8fad6e2247a4ca75a0f43d72
Branch: master
https://github.com/mongodb/mongo/commit/d2bb000cdef205ebea073c6eac5d2fcb2a5ee48a

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