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

Ensure AsyncRequestMerger is constructed with valid TaskExecutor

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Sharding EMEA
    • Sharding EMEA 2023-03-20, Sharding EMEA 2023-04-03, Sharding EMEA 2023-06-26, Sharding EMEA 2023-07-10, Sharding EMEA 2023-07-24, Sharding EMEA 2023-08-07, Sharding EMEA 2023-08-21, Sharding EMEA 2023-09-04, Sharding EMEA 2023-09-18, Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30
    • 1

      When populating DocumentSourceMergeCursors we extract the TaskExecutor from the MongoProcessInterface of the given epression context. This is not always safe because the MongoProcessInterface could be built with a null executor.

      In case a null executor is used the underlying BlockingResultsMerger will through a Segfault on first execution of getNext, that is difficult to debug.

      In order to ease the debug process and early detect those programming errors I would suggest to use invariants to ensure the TaskExecutor is valid when populating the DocumentSourceMergeCursor stage.

      Additionally we should ask similar invariant in the constructor of AsyncResultsMerger.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: