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

Add explicit synchronization to TaskExecutor's exhaust command promises

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.4, 5.1.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Sprint:
      Service Arch 2021-07-12
    • Linked BF Score:
      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

            Assignee:
            tyler.seip Tyler Seip
            Reporter:
            tyler.seip Tyler Seip
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: