Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7462

Investigate changes in SERVER-82274: singleBatch find on a timeseries collection does not close cursor if batchSize is set

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      Original Downstream Change Summary

      In the very specific case you run a command over a view with the configuration "db.runCommand({find: 'myview', filter: {}, singleBatch: true, batchSize: 1, limit: 1})" (with those flags and values specifically), in versions 7.2 and earlier the server will return a cursor. If you ran any getMores with that cursor it would return no results and the cursor would be closed. With this change, in v7.3 and beyond, the server will not return a cursor on that initial command.

      Description of Linked Ticket

      When using a TimeSeries collection if a find command has batchSize:1 and singleBatch:true the cursor returned is not closed, it reports a non-zero id. If the batchSize is omitted then the cursor will be closed. The same behavior is not observed for a typical collection, the id returned is always zero when singleBatch is set.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: