-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.0.17
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding NYC 2023-05-01
-
29
RestoreMetricsAfterStepUp relies on the global ServiceContext's clock source to really be a ClockSourceMock. In the 6.0 branch, this is achieved by using the useMockClock option on the test frameworks. However, in 5.0, this option is not available, and so the ReshardingRecipientServiceTest sets this up after calling repl::PrimaryOnlyServiceMongoDTest::setUp(). PrimaryOnlyServiceMongoDTest::setUp() also will set up PrimaryOnlyService for the test, which will begin accessing the clock source from a separate thread. It's therefore possible that the PrimaryOnlyService accesses the clock source while the ReshardingRecipientServiceTest is setting the clock source, causing TSAN to complain.