Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76516

Fix Concurrent Access of Clock in ReshardingRecipientServiceTest in 5.0 Branch

    • 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.

            Assignee:
            brett.nawrocki@mongodb.com Brett Nawrocki
            Reporter:
            brett.nawrocki@mongodb.com Brett Nawrocki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: