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

whenAny/whenAll/whenAllSucceed never fulfill returned future if input executor is already shut down

    XMLWordPrintableJSON

Details

    • Service Arch
    • ALL
    • 4

    Description

      For these helper functions, if the input futures are ExecutorFutures but their executor is shut down, the callback inside getAsync won't run, meaning that their returned future will never be resolved, possibly leading to hangs.

      This can be fixed by using unsafeToInlineFuture before calling .getAsync, since the getAsync is only doing minor work like signaling atomics and setting a promise.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: