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

Write database version file to disk #2034

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Write database version file to disk #2034

merged 1 commit into from
Dec 18, 2024

Conversation

JamesHinshelwood
Copy link
Contributor

This will let us make breaking changes to the database format in the future, without having to write ugly code which has to guess what version of data it is reading.

86667
86667 previously approved these changes Dec 18, 2024
Copy link
Contributor

@86667 86667 left a comment

Choose a reason for hiding this comment

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

This doesnt allow us to ever update the version as the error will always throw. I suppose it forces a re-sync rather than bugs surfacing later on.

For backwards compatible changes we should allow for different versions up to a block height (using config.forks) and then update this version field in the table. Not sure how that would work with this hard coded CURRENT_DB_VERSION.

Just thinking out loud.

Copy link
Contributor

github-actions bot commented Dec 18, 2024

🐰 Bencher Report

Branchdb-version
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
process-empty/process-empty📈 view plot
🚷 view threshold
8,300,100.00
(-8.96%)
10,534,165.46
(78.79%)
produce-full/produce-full📈 view plot
🚷 view threshold
2,254,800,000.00
(+3.17%)
2,959,083,158.84
(76.20%)
🐰 View full continuous benchmarking report in Bencher

This will let us make breaking changes to the database format in
the future, without having to write ugly code which has to guess
what version of data it is reading.
@JamesHinshelwood JamesHinshelwood added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit c607080 Dec 18, 2024
6 checks passed
@JamesHinshelwood JamesHinshelwood deleted the db-version branch December 18, 2024 09:53
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