Skip to content

feat(NODE-6472): run findOne without cursor #4580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat(NODE-6472): run findOne without cursor #4580

wants to merge 5 commits into from

Conversation

durran
Copy link
Member

@durran durran commented Jul 9, 2025

Description

Changes findOne to set options that will not require a cursor or a killCursors command. Updates find to not leave cursors open on the server when batch size and limit are equal.

What is changing?

  • findOne no longer creates a FindCursor object, but instead calls executeOperation with a new FindOneOperation.
  • The find one operation now deprecates options for it specifically which are irrelevant.
  • The find operation now sets batchSize to batchSize + 1 when the limit it equal to it.
  • Syncs CRUD spec tests.
Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Fill in title or leave empty for no highlight

Double check the following

  • Ran npm run check:lint script
  • 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

@durran durran force-pushed the NODE-6472 branch 3 times, most recently from 2f2ee7c to 62c9811 Compare July 9, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant