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

Find command may save plans that are holding locks on error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-05-13
    • 145

      As part of SERVER-84574 we made it so that endQueryOp may now throw an exception since it tries to acquire the global lock. This however has introduced an error scenario that couldn't happen before:

      • The command starts executing the find command and successfully builds a batch.
      • The command then proceeds to create a getMore cursor and enters this block.
      • The block then creates a new cursor and puts the PlanExecutor in there.
      • endQueryOp throws an error due to the interruption of the opCtx.
      • This causes us to never release the locks as that happens in the line below.

      In this scenario we would end up with a cursor that has a PlanExecutor with live locks taken.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: