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

Change index creation time from being on connect to on create #51

Merged
merged 7 commits into from
Apr 1, 2024

Conversation

Kezzsim
Copy link
Contributor

@Kezzsim Kezzsim commented Mar 28, 2024

Users at NSLS-II have reported that connections handled through suitcase mongo can be exceptionally slow when searching for data. Part of this might be from superfluous use of pymongo.serializer in certain methods like update_metadata, but we've identified that another cause is the client's attempt to create indexes upon each connection.

This PR is an attempt to address #37

Tasks required

  • Make create_index a public method
  • Remove that method from _init_ so it does not run every time
  • Update docs to inform users that they need to create indexes manually when setting up or migrating a mongo tiled database.
  • Pass all tests

@Kezzsim Kezzsim force-pushed the index_optimization branch from 45395a1 to 2e7a2b9 Compare March 28, 2024 20:31
@tacaswell tacaswell closed this Mar 29, 2024
@tacaswell tacaswell reopened this Mar 29, 2024
@danielballan danielballan merged commit 317b70c into bluesky:master Apr 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants