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

Investigate whether SBE needs to behave differently if WriteConflictException is thrown

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • None
    • Querying
    • None
    • Fully Compatible
    • Query Execution 2021-04-19, Query Execution 2021-05-03

    Description

      The classic execution engine has logic (implemented with the NEED_YIELD return code) to allow query execution to tolerate a WriteConflictException thrown from the storage layer. In short, if WCE is thrown by an operation on a storage cursor, the exception is caught and propagated to the PlanExecutorImpl via NEED_YIELD. The plan executor undergoes the yielding process and then picks up query execution where it left off.

      No such logic exists today in the SBE engine, and SBE is generally unable to resume if an arbitrary exception is thrown. We should investigate whether SBE actually needs to tolerate SBE in the way that the classic engine does, and if so figure out how this could be achieved. My understanding is that WCE during find operations is either exceedingly rare or impossible (it is called a "write conflict" after all), so perhaps we could just retry the query from the beginning with a retry loop at a very high level?

      Attachments

        Activity

          People

            ian.boros@mongodb.com Ian Boros
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: