Skip to content

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Oct 13, 2025

Description

Summary of Changes

Cursors no longer provide a default batchSize of 1000 for getMores.

Notes for Reviewers

What is the motivation for this change?

Release Highlight

Cursors no longer provide a default batchSize of 1000 for getMores

In driver versions <7.0, the driver provides a default batchSize of 1000 for each getMore when iterating a cursor. This behavior is not ideal because the default is set regardless of the documents being fetched. For example, if a cursor fetches many small documents, the driver's default of 1000 can result in many round-trips to fetch all documents, when the server could fit all documents inside a single getMore if no batchSize were set.

Now, cursors no longer provide a default batchSize when executing a getMore. A batchSize will only bet set on getMore commands if a batchSize has been explicitly configured for the cursor.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review October 14, 2025 15:38
@baileympearson baileympearson requested a review from a team as a code owner October 14, 2025 15:38
@durran durran self-assigned this Oct 15, 2025
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 15, 2025
@baileympearson baileympearson requested a review from durran October 15, 2025 15:18
@durran
Copy link
Member

durran commented Oct 17, 2025

Waiting on CI, perf tests timed out and rerunning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants