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

SBE can crash for $_resumeAfter for clustered collections with null value

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: 7.1.0-rc0
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2023-07-10

      There is a difference in classic and SBE when running $_resumeAfter with clustered collections where SBE can crash the server (steps to reproduce are below). This will affect all versions that use SBE for clustered collections (right now only 7.1)

      I think this is partially because how SBE and classic handle null input to $_resumeAfter. Classic and SBE return different results for the postBatchResumeToken after all the documents are returned in the collection. When we have no more documents left, classic returns {$recordId: null} and then after returns the first document recordId. SBE just returns the last document recordId again and again. SBE does not return a null value.

      Either both engines should return the same output, or at least SBE should not crash when run with {'$recordId': null}. This was discovered in another bug investigation (SERVER-77386).

            Assignee:
            kevin.cherkauer@mongodb.com Kevin Cherkauer
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: