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

TransactionCoordinatorMetricsTest should install mock tick source before starting WaitForMajorityService

    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-06-15, Sharding 2020-06-29
    • 0

      TransactionCoordinatorMetricsTest::setUp() sets a MockTickSource on the service context after calling TransactionCoordinatorTestBase::setUp(). This sets up the TransactionCoordinatorTestFixture, which begins the WaitForMajorityService, which spawns a thread that creates operation contexts, which accesses the service context's tick source. The tick source isn't protected by a mutex, so this is a data race. Setting the mock tick source before setting up the WaitForMajorityService should avoid this.

            Assignee:
            luis.osta@mongodb.com Luis Osta (Inactive)
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: