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

fix: Maintain indexes across schema versions #3367

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

AndrewSisley
Copy link
Contributor

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.

Sorry about the bother.

@AndrewSisley AndrewSisley added bug Something isn't working area/schema Related to the schema system area/collections Related to the collections system labels Jan 10, 2025
@AndrewSisley AndrewSisley added this to the DefraDB v0.16 milestone Jan 10, 2025
@AndrewSisley AndrewSisley requested a review from a team January 10, 2025 21:46
@AndrewSisley AndrewSisley self-assigned this Jan 10, 2025
Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

Good catch! LGTM

Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewSisley AndrewSisley merged commit 072eaf6 into sourcenetwork:develop Jan 10, 2025
39 of 41 checks passed
@AndrewSisley AndrewSisley deleted the 3365-patch-index-2 branch January 10, 2025 22:04
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.48%. Comparing base (628e03d) to head (72d1c46).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
internal/db/collection_index.go 66.67% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3367      +/-   ##
===========================================
+ Coverage    78.30%   78.48%   +0.18%     
===========================================
  Files          392      392              
  Lines        35688    35688              
===========================================
+ Hits         27944    28008      +64     
+ Misses        6096     6049      -47     
+ Partials      1648     1631      -17     
Flag Coverage Δ
all-tests 78.48% <85.71%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/db/fetcher/indexer_iterators.go 85.01% <100.00%> (ø)
internal/db/index.go 78.63% <100.00%> (ø)
internal/db/collection_index.go 87.50% <66.67%> (ø)

... and 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 628e03d...72d1c46. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system area/schema Related to the schema system bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indexes disappear after patching schema
3 participants