-
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
feat(NODE-4189): Support clustered collections #3229
Conversation
* @see https://www.mongodb.com/docs/v5.3/core/clustered-collections/ | ||
*/ | ||
export interface ClusteredCollectionOptions extends Document { | ||
name?: string; |
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.
Name is optional and if left out the index will be named by the server automatically.
*/ | ||
export interface ClusteredCollectionOptions extends Document { | ||
name?: string; | ||
key: Document; |
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.
According to the scope, key is required. But right now the only valid valid is { _id: 1 }
export interface ClusteredCollectionOptions extends Document { | ||
name?: string; | ||
key: Document; | ||
unique: boolean; |
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.
According to the scope, unique is required. But right now it has to be set to true
.
I copied what's done for timeseries and didn't see that come up in any tests, so found no tests to implement. Maybe I just missed them. Please let me know if I should add any and where. |
Don't know what this error is:
|
This error is unrelated. |
MongoDB 5.3 added support for clustered collections. Clustered collections are collections with a clustered index.
I based the changes in this PR off how timeseries collections work.
Scope: https://docs.google.com/document/d/1r_1BBIlfELnKBz5qAzzLDUB-BJfGrQKTS2TNHXu4DRg/edit#heading=h.b1os3ai9s8t3
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>