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: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.1
    • Component/s: Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2020-06-01, Query 2020-06-15
    • Linked BF Score:
      13

      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

            Assignee:
            david.storch David Storch
            Reporter:
            david.storch David Storch
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: