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

Change SharedFuture tests to use InlineRecursiveCountingExecutor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Service arch 2020-09-07
    • 0

      Several SharedFuture tests add multiple continuations to the shared future while a background thread emplaces into the linked promise. This produced a race condition where the background thread might have to schedule() work for a continuation that's already been registered at the same time as the test thread is registering a new continuation. The InlineQueuedCountingExecutor, however, is not thread safe, and concurrent calls to schedule() on it can result in a data race and thus a test failure. We should switch these tests to use the InlineRecursiveCountingExecutor instead, which is thread safe.

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: