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

Fail in query execution by throwing rather than the FAILURE state code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Querying
    • Labels:
      None

      Description

      If a PlanStage encounters a runtime failure, it currently is required to allocate a special WorkingSetMember representing a Status object and to return StageState::FAILURE. This forces all PlanStage implementations to be prepared to explicitly handle a FAILURE status from their children, which results in lots of boilerplate. It would be simpler to fail by throwing an exception, like we do if a query fails in DocumentSource execution code. This will also allow us to delete the undesirable code that packs a Status object into a Document.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: