Pipeline::dispose() should not check for stale databaseVersion

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query
    • ALL
    • 17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As part of cleaning up the execution machinery for an aggregation cursor, Pipeline::dispose() must be called before calling the Pipeline destructor. For exception safety, we use a std::unique_ptr Deleter to ensure that Pipeline::dispose() is called whenever an error occurs.

      This implies Pipeline::dispose() cannot throw, since it may be called when an exception is already active. However, DocumentSourceCursor::doDispose() constructs an AutoGetDb. AutoGetDb can throw an exception on construction due to stale databaseVersion. Since we don't attach a databaseVersion for aggregate commands, we have only ever observed this scenario for explain of an aggregate command. Still, skipping the stale databaseVersion check in the disposal process would ensure that we never run into a double-exception bug.

              Assignee:
              Backlog - Query Team (Inactive)
              Reporter:
              David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: