-
Notifications
You must be signed in to change notification settings - Fork 56
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
fix: Maintain indexes across schema versions #3366
fix: Maintain indexes across schema versions #3366
Conversation
This passes when commenting out the patch, but fails on when including it.
ID changes on every patch, so the indexes were lost.
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.
LGTM!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3366 +/- ##
========================================
Coverage 78.42% 78.42%
========================================
Files 392 392
Lines 35688 35688
========================================
+ Hits 27985 27986 +1
+ Misses 6065 6064 -1
Partials 1638 1638
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
## Relevant issue(s) Resolves #3365 ## Description Completes the fix started in #3366 - I missed a test case there and only tested with docs created after the patch. This adds a new test, testing with docs created before the patch, and then updates all index related references from col.ID to col.RootID.
Relevant issue(s)
Resolves #3365
Description
Maintains indexes across schema versions.
This is a quick, short term fix. Long term I think we need to store the index descriptions correctly on the collection, as the current method is unexpected, and very error prone (there are lots of aggressively coded defensive
col.loadIndex
calls dotted about).Big shout out to @jsimnz , who did a lot of the hard work in narrowing down the bug last night leaving me with the easy fix in the morning :)