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

feat(NODE-4185): Allow opting out of disk use on cursor builder #3230

Merged
merged 4 commits into from May 5, 2022

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented May 3, 2022

See also:

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>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@lerouxb
Copy link
Contributor Author

lerouxb commented May 3, 2022

I can't tell if/where to add tests.

@lerouxb lerouxb marked this pull request as ready for review May 3, 2022 13:30
addaleax
addaleax previously approved these changes May 3, 2022
@baileympearson
Copy link
Contributor

Hey @lerouxb and @addaleax - the Node team discussed this work yesterday during our triage. The Node driver currently doesn't pass along a value for allowDiskUse if no value is specified from the user. This means that drivers changes aren't necessary for this work, because we won't be overriding the new server default with the old default. The only other work associated with this change sync the new spec tests, which due to a miscommunication and time zone differences, @kampofo completed this morning (see #3231). Sorry for the duplicated effort here but we'll close this PR and use Kobby's since the work is completed there.

@addaleax addaleax reopened this May 3, 2022
@addaleax
Copy link
Contributor

addaleax commented May 3, 2022

Talked with @baileympearson on Slack, it seems like #3231 makes this appear like something that’s already done, but in reality the tests there don’t test the builder API, only the options object API, so we do still want this 🙂

@baileympearson
Copy link
Contributor

Yup. We still want to make this change, but we should add tests for the new options. I think the tests should go in find_cursor_methods.js.

As far as testing this option, we can use command monitoring on the MongoClient to ensure that the find commands contain the allowDiskUse option when they're sent to the database with the correct value.

@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label May 3, 2022
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for this new function? See my previous comment. I'm just requesting changes for visibility on this PR 😄

@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 5, 2022
@baileympearson baileympearson changed the title feat(NODE-4185): Allow opting out of disk use feat(NODE-4185): Allow opting out of disk use on cursor builder May 5, 2022
@baileympearson baileympearson merged commit d216725 into mongodb:main May 5, 2022
@baileympearson baileympearson deleted the allow-disk-use-false branch May 5, 2022 17:13
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
5 participants