Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@focusaurus
Copy link
Contributor

Impact: minor
Type: performance

Issue

For search we will be querying the Catalog collection sorted by the updatedAt timestamp field when syncing via kafka-connect. MongoDB requires an index on this field to efficiently process this query.

Solution

Add the index via the mongo API.

Breaking changes

N/A

Notes

Index creation will run in the background, but does require some resources to do. Most installations won't notice this until it's already done, but if you had a very large catalog data set you may notice mongodb using resources to index the data for a brief period.

Testing

  1. Unit tests still pass
  2. eslint still passes
  3. Verified the index exists with mongo shell db.Catalog.getIndexes()

@focusaurus focusaurus self-assigned this Nov 21, 2018
@kieckhafer kieckhafer changed the base branch from master to release-2.0.0-rc.7 November 28, 2018 19:46
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed index is added, and unit tests and linting passes.

We are seeing one failing test (deploy-to-ecs-feature-branch), but we are aware of what this is, and @griggheo is working on it and it will be fixed in a different PR, most likely #4821.

@kieckhafer kieckhafer merged commit 9789051 into release-2.0.0-rc.7 Nov 28, 2018
@kieckhafer kieckhafer deleted the feat-pete-index-updatedat-1 branch November 28, 2018 19:55
@spencern spencern mentioned this pull request Jan 8, 2019
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