ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1024
    • Affects Version/s: None
    • Component/s: None
    • None
    • DB Integration & Observability
    • Fully Compatible
    • ALL
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Claude identified this is a race in our external data source test ("external data source" is the thing that ADF uses for their federated queries).

      Root cause: named-pipe creation race

      _writeTestPipeObjects() only spawns a detached thread and returns immediately — the test calls aggregate() on the very next line, before the pipe is guaranteed to exist.

      The mkfifo() call happens inside that detached thread, via NamedPipeOutput's ctor, called from writeToPipeObjectsAsync() — there's no signal back to JS that the FIFO now exists.

      mongod's reader side papers over this with a poll/sleep retry loop instead of a blocking wait: NamedPipeInput::doOpen() retries on ENOENT, sleeping 1→2→4→8→16ms, capped at ~31s total. If the writer thread isn't scheduled in time (likely on an oversubscribed try host), the retries exhaust and it throws FileNotOpen (throw site) — exactly this BF's error.

      Same test has a long flaky history.

      Fix (test-only): poll pathExists() via assert.soon() after each async pipe write, before aggregate(), so the FIFO is guaranteed to exist before the reader tries to open it.

            Assignee:
            Chris Wolff
            Reporter:
            Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: