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

fix(NODE-5745): Ignore Read/Write Concern in Atlas Search Index Helpers #4042

Merged
merged 21 commits into from
Apr 11, 2024

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Mar 15, 2024

Description

Synced tests and remove r/w concern from relevant method's options value.

What is changing?

Added spec tests to ensure readConcern and writeConcern are not sent to command with Atlas Search Helpers.
Explicitly remove readConcern and writeConcern from Collection.listSearchIndexes.

Is there new documentation needed for these changes?

No.

What is the motivation for this change?

Spec compliance.

Release Highlight

Omit readConcern and writeConcern in Collection.listSearchIndexes options argument

Important

readConcern and writeConcern are no longer viable keys in the options argument passed into Collection.listSearchIndexes

This type change is a correctness fix.

Collection.listSearchIndexes is an Atlas specific method, and Atlas' search indexes do not support readConcern and writeConcern options. The types for this function now reflect this functionality.

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

@aditi-khare-mongoDB aditi-khare-mongoDB changed the title fix(NODE-5745): Ignore Read/Write Concern in Atlas Search Index Helpers feat(NODE-5745): Ignore Read/Write Concern in Atlas Search Index Helpers Mar 15, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review March 19, 2024 18:45
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Is this a feature? it doesn't modify any driver source. What about the txn unknown mentioned in the ticket? (Are txn's even relevant?)

@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 19, 2024
@nbbeeken nbbeeken self-assigned this Mar 19, 2024
@aditi-khare-mongoDB
Copy link
Contributor Author

There's a small code change, I mistakenly marked this as Ready for Review preemptively, but it is ready for review now. I'm not sure how transactions are relevant, since we never pass wr concern into the command anyway.

@nbbeeken
Copy link
Contributor

Transactions are controlled by the session, if a session is in a transaction it will apply the transaction's wc/rc settings, so how are we handling that? Do we need to handle that?

src/collection.ts Outdated Show resolved Hide resolved
aditi-khare-mongoDB and others added 2 commits March 20, 2024 15:54
…noresReadWriteConcern-with-transaction.json

Change to more descriptive file name
src/collection.ts Outdated Show resolved Hide resolved
@aditi-khare-mongoDB aditi-khare-mongoDB force-pushed the NODE-5745/avoid-wr-append-in-atlas-search-index-helper branch from fb703c6 to 59ed066 Compare March 20, 2024 20:14
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Is this really a feat? shouldn't it be a fix?

@nbbeeken nbbeeken changed the title feat(NODE-5745): Ignore Read/Write Concern in Atlas Search Index Helpers fix(NODE-5745): Ignore Read/Write Concern in Atlas Search Index Helpers Mar 21, 2024
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
Development

Successfully merging this pull request may close these issues.

3 participants