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

Add explicit synchronization to TaskExecutor's exhaust command promises

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.4, 5.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Service Arch 2021-07-12
    • 143

    Description

      BF-20271 shows that setting the result of the exhaust command promises upon destruction is insufficient to avoid deadlocks between calls to .get() on returned futures and setting the promise result, which is normally triggered by the destruction of the callback contained within the future. Unfortunately, parts of the network interface hold shared pointers to the internals of that callback, which means we can't guarantee that all references to the callback are destroyed before we block on .get(), which is a problem in unit tests where the main thread services both the test and the network interface. In this ticket, add a more explicit mechanism for setting the promise that doesn't depend on destruction of the callback.

      Attachments

        Activity

          People

            tyler.seip@mongodb.com Tyler Seip (Inactive)
            tyler.seip@mongodb.com Tyler Seip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: