Fix unsafe access to TransactionRouter in AsyncResultsMerger

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-05-26
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      SERVER-105101 recently introduced an optimization to not buffer all remote responses received in the async response handling function of the AsyncResultsMerger.
      In order to reduce memory usage, the idea was to directly process the received responses if the ARM was still attached a valid OperationContext.
      It turned out that this idea does not work, because immediately processing the responses from the network thread will lead to data races in the TransactionRouter, which is not thread-safe.

      This ticket will re-introduce the buffering of the responses that we previously used.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: