Skip to content
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

refactor(NODE-6057): implement CursorResponse for lazy document parsing #4085

Merged
merged 25 commits into from May 1, 2024

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Apr 17, 2024

Description

What is changing?

  • Implement a CursorResponse subclass of MongoDBResponse
    • Implements logic to abstract List vs CursorResponse handling
  • Make FindCursors use CursorResponse
Is there new documentation needed for these changes?

TBD. Is this something we want to apply to all cursors? Should we progressively migrate to this?

What is the motivation for this change?

An attempt at increasing performance. A sucessful decoupling of driver BSON and user BSON settings.

Only for FindCursor, BSON documents from the current batch are now parsed on each iteration.

One clear improvement is that any cursor that is closed before exhaustion will take significantly less run time.

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

@nbbeeken nbbeeken force-pushed the chore-cursor-v2-final branch 2 times, most recently from 98a105b to a537db1 Compare April 18, 2024 19:42
@nbbeeken nbbeeken marked this pull request as ready for review April 19, 2024 18:01
@baileympearson baileympearson self-assigned this Apr 19, 2024
@baileympearson baileympearson added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Apr 19, 2024
src/cmap/wire_protocol/responses.ts Outdated Show resolved Hide resolved
src/cursor/abstract_cursor.ts Outdated Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Outdated Show resolved Hide resolved
src/cursor/find_cursor.ts Show resolved Hide resolved
test/unit/assorted/collations.test.js Show resolved Hide resolved
src/client-side-encryption/auto_encrypter.ts Outdated Show resolved Hide resolved
src/client-side-encryption/auto_encrypter.ts Outdated Show resolved Hide resolved
src/client-side-encryption/state_machine.ts Outdated Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Outdated Show resolved Hide resolved
src/client-side-encryption/auto_encrypter.ts Outdated Show resolved Hide resolved
test/integration/client-side-encryption/driver.test.ts Outdated Show resolved Hide resolved
src/operations/find.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels May 1, 2024
@baileympearson baileympearson merged commit 9d73f45 into main May 1, 2024
21 of 26 checks passed
@baileympearson baileympearson deleted the chore-cursor-v2-final branch May 1, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
3 participants