The tests exhaust.js fails when sbe is enabled and when the number of docs to return is equal to the batchSize. SBE requires one additional getMore call to fully exhaust the cursor. However, in the shell, the hasNext method https://github.com/10gen/mongo/blob/master/src/mongo/shell/query.js/#L244 closes the cursor when the cursor has seen limit docs. The cursor still has the moreToCome bit set and returns information about this cursor when the next query is called. The shell should not close the cursor in this case. The server already handles exhaust cursors properly: only closes them once moreToCome is unset.
- is depended on by
-
SERVER-91133 exhaust.js fails with 'featureFlagSbeFull' or in a sharded environment
- Closed