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

Ensure AsyncRequestMerger is constructed with valid TaskExecutor

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: