If releaseMemory fails with an unexpected error, we should destroy the cursor

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2025-06-23
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      If during releaseMemory we fail to write to disk, then the output of the future getMore operations can be unpredictable. To be safer, we should destroy the cursor.

      Currently expected errors could be:
      1. CursorInUse - cursor is already pinned by getMore, we could not corrupted it.
      2. Interrupted - operation was interrupted by a user and we only check for interruptions in fixed places.
      3. NoDiskUseAllowed - release memory was not allowed to write anything to disk, so it couldn't mess with the cursor
      4. OutOfDiskSpace - This might happen at any moment during spilling (SERVER-104360) leaving the cursor in a corrupted state

            Assignee:
            Foteini Alvanaki
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: