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

Add storage version info #1436

Merged
merged 1 commit into from
Apr 2, 2023
Merged

Add storage version info #1436

merged 1 commit into from
Apr 2, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented Apr 2, 2023

Implement storage version info

  1. When starting database, the catalog will check whether the storage version number stored in the file matches the one in the current build. If not, an exception will be thrown.
  2. When writing catalog to disk, we also save the storage version number to the header of the catalog file.

@codecov
Copy link

codecov bot commented Apr 2, 2023

Codecov Report

Patch coverage: 81.25% and project coverage change: +0.06 🎉

Comparison is base (8a5a826) 92.64% compared to head (2a87e77) 92.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1436      +/-   ##
==========================================
+ Coverage   92.64%   92.70%   +0.06%     
==========================================
  Files         650      652       +2     
  Lines       22613    22787     +174     
==========================================
+ Hits        20949    21125     +176     
+ Misses       1664     1662       -2     
Impacted Files Coverage Δ
src/include/catalog/catalog.h 100.00% <ø> (ø)
src/include/storage/storage_info.h 75.00% <75.00%> (ø)
src/catalog/catalog.cpp 89.84% <83.33%> (-0.43%) ⬇️

... and 10 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mewim
Copy link
Collaborator

mewim commented Apr 2, 2023

Could we separate the storage version and the database version into two vars? Maybe it would be useful to upgrade the database version while maintaining the old storage version if it does not change?

Copy link
Contributor

@ray6080 ray6080 left a comment

Choose a reason for hiding this comment

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

Can you also add a magic word ('KUZU') check? We should error if there is no magic word. (something along this line: "This is not a valid Kuzu database directory for the current version of Kuzu.")

@ray6080
Copy link
Contributor

ray6080 commented Apr 2, 2023

Could we separate the storage version and the database version into two vars? Maybe it would be useful to upgrade the database version while maintaining the old storage version if it does not change?

One way to solve this might be to put multiple project versions pointing to the same storage version inside StorageVersionInfo.

@acquamarin acquamarin force-pushed the version-number branch 2 times, most recently from 3d5b36a to 2ebd3a3 Compare April 2, 2023 14:56
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.

None yet

3 participants