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

Creation/deletion of index done to secondary replica sets #59

Open
flower-of-the-bridges opened this issue Mar 31, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@flower-of-the-bridges
Copy link
Member

Feature Description

Actually, the crud-service deletes and creates indexes at runtime on the configured database.
By default, if not specified on the MONGODB connection string, all operations are done on the primary replica set.

When the primary set is required to use a high amount of memory/cpu, a crud-service that starts up and connects to it may increase the operation load on the primary replica set and slow down the whole infrastructure.

Desired solution

At runtime is possible to switch the type of replica set the MongoDB client is used with the method setReadPreference('<replica set type>') from the MongoDbClient.

So I expect that the crud-service can switch the creation/deletion of indexes on the secondary replica set and after the creation/deletion of indexes is completed can return to the main one to perform the operation submitted by the users.

@flower-of-the-bridges flower-of-the-bridges added the enhancement New feature or request label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant