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

Fix Concurrent Access of Clock in ReshardingRecipientServiceTest in 5.0 Branch

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Sharding NYC 2023-05-01
    • 29

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: