-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-6019): indexExists always returns false when full
is set to true
#4034
Merged
nbbeeken
merged 17 commits into
main
from
NODE-6019-remove-dead-and-redundant-index-management-code
Mar 18, 2024
Merged
fix(NODE-6019): indexExists always returns false when full
is set to true
#4034
nbbeeken
merged 17 commits into
main
from
NODE-6019-remove-dead-and-redundant-index-management-code
Mar 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baileympearson
force-pushed
the
NODE-6019-remove-dead-and-redundant-index-management-code
branch
from
March 15, 2024 17:22
329f658
to
4930d0e
Compare
baileympearson
changed the title
remove EnsureIndexOperation and CreateIndexOperation
refactor(NODE-6019): clean up index management code
Mar 15, 2024
baileympearson
commented
Mar 15, 2024
nbbeeken
added
the
Primary Review
In Review with primary reviewer, not yet ready for team's eyes
label
Mar 15, 2024
nbbeeken
requested changes
Mar 15, 2024
nbbeeken
requested changes
Mar 18, 2024
baileympearson
force-pushed
the
NODE-6019-remove-dead-and-redundant-index-management-code
branch
from
March 18, 2024 17:13
cf3906b
to
9316bb9
Compare
nbbeeken
approved these changes
Mar 18, 2024
nbbeeken
requested changes
Mar 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From slack: this fixes a bug with full:true
in indexExists, we should call attention to that with the usual fix and release note pairing 🍷🧀. Should only need PR title and body changes so no need for another CI run. I'll merge when you re-request me. TIA.
baileympearson
changed the title
refactor(NODE-6019): clean up index management code
fix(NODE-6019): indexExists always returns false when Mar 18, 2024
full
is set to true
This was referenced Sep 6, 2024
This was referenced Sep 7, 2024
This was referenced Sep 24, 2024
This was referenced Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is changing?
In preparation for NODE-5971, I took time to clean up our index management implementation.
index_management.test.js
is converted to TS and async await.EnsureIndexOperation
is removed.CreateIndexOperation
has been removed in favor ofCreateIndexesOperation
.indexInformation
helper has been removed and the classes that used it as well:Indexes
,IndexExists
andIndexInformation
operations have had their logic shifted into the collection class. Additionally, tests were added to ensure the behavior was not broken for these functions.Is there new documentation needed for these changes?
What is the motivation for this change?
Release Highlight
indexExists()
no longer supports thefull
optionThe
Collection.indexExists()
helper supported an option,full
, that modified the internals of the method. Whenfull
was set totrue
, the driver would always returnfalse
, regardless of whether or not the index exists.The
full
option is intended to modify the return type of index enumeration APIs (Collection.indexes()
andCollection.indexInformation()
, but since the return type ofCollection.indexExists()
this option does not make sense for theCollection.indexExists()
helper.We have removed support for this option.
indexExists()
,indexes()
andindexInformation()
support cursor options in TypescriptThese APIs have supported cursor options at runtime since the 4.x version of the driver, but our Typescript has incorrectly omitted cursor options from these APIs.
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript