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

Many callers of PlanExecutor::restoreState() ignore the return value

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Query 2018-01-15

    Description

      PlanExecutor::restoreState() returns a boolean indicating whether it's safe to use. If a WriteConflictException is encountered while restoring, we may need to yield to recover. If this is the case, some event like a collection drop could invalidate the PlanExecutor. It seems like maybe it's safe to continue after this happens, since most callers immediately call PlanExecutor::getNext afterwards, which checks if it was killed and will return PlanExecutor::DEAD immediately.

      We should either make all callers handle the return value, or change it to return void if it's safe. It seems better to handle it - since calling restoreState() might leave you in a state where you have no locks.

      Attachments

        Activity

          People

            charlie.swanson@mongodb.com Charlie Swanson
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: