-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Skip indexes for Azure Cosmos DB for MongoDB #8494
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
base: alpha
Are you sure you want to change the base?
feat: Skip indexes for Azure Cosmos DB for MongoDB #8494
Conversation
The branch Pull requests are usually opened against the default branch |
Thanks for opening this pull request! |
This should probably be rather a MongoDB adapter option, than an option on the root level of Parse Server. |
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.
See #8492 (comment)
…osmos DB for MongoDB Add docs change and config validator
…seOptions config node
0d16584
to
700d002
Compare
As mentioned in the linked issue, I have made the changes by (a) splitting into separate options (b) move to DatabaseOptions node (seems no MongoDb node? so I think it should be here). |
@EraserKing @mtrezza maybe related #8042 |
:DEFAULT: false */ | ||
disableEnsureUsernameCaseInsensitiveIndex: ?boolean; | ||
/* Disables behavior to ensure case-insensitive index on field email on _User collection. Set to `true` if using a database not supporting case-insensitive indexes. | ||
:DEFAULT: false */ | ||
disableEnsureEmailCaseInsensitiveIndex: ?boolean; | ||
/* Disables behavior to ensure time to live index on field expire on _Idempotency collection. Set to `true` if using a database not supporting TTL index on this field. | ||
:DEFAULT: false */ | ||
disableEnsureIdempotencyExpireIndex: ?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.
It will introduce security issues to just disable case insensitivity on username and email, i sent a more complete PR to force email and username to lowercase in this cases: #8042
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.
It will introduce security issues to just disable case insensitivity on username and email, i sent a more complete PR to force email and username to lowercase in this cases: #8042
Thanks, I noticed this comment just now
I would update my PR to take your changes once your PR is merged
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.
missing tests
Is this feature coming anytime soon? |
Pull Request
Issue
Closes: #8492
Approach
By adding a switch in options called "azureCosmosMongoDbCompatibleMode". Setting it to true would bypass some indexes to be created when you would like to use Azure Cosmos DB for MongoDB as the database.
Normally, by default, this is off, and there should not be any impact on existing behaviors.
Tasks