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

change(state): Prepare for in-place database format upgrades, but don't make any format changes yet #7031

Merged
merged 44 commits into from
Jul 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8d08780
Move format upgrades to their own module and enum
teor2345 Jun 20, 2023
3d8cda0
Launch a format change thread if needed, and shut it down during shut…
teor2345 Jun 20, 2023
33b4b61
Add some TODOs and remove a redundant timer
teor2345 Jun 20, 2023
8339ddb
Regularly check for panics in the state upgrade task
teor2345 Jun 21, 2023
376c800
Only run example upgrade once, change version field names
teor2345 Jun 25, 2023
b05ce29
Increment database format to 25.0.2: add format change task
teor2345 Jun 25, 2023
45b232e
Log the running and initial disk database format versions on startup
teor2345 Jun 25, 2023
1ee0ab4
Add initial disk and running state versions to cached state images in CI
teor2345 Jun 25, 2023
c0c7215
Fix missing imports
teor2345 Jul 5, 2023
7fcef28
Fix typo in logs workflow command
teor2345 Jul 5, 2023
32d0e9c
Add a force_save_to_disk argument to the CI workflow
teor2345 Jul 6, 2023
f961230
Move use_internet_connection into zebrad_config()
teor2345 Jul 6, 2023
7f222af
fastmod can_spawn_zebrad_for_rpc can_spawn_zebrad_for_test_type zebra*
teor2345 Jul 6, 2023
fc6e6e5
Add a spawn_zebrad_without_rpc() function
teor2345 Jul 6, 2023
571fb52
Remove unused copy_state() test code
teor2345 Jul 6, 2023
c1c8ce0
Assert that upgrades and downgrades happen with the correct versions
teor2345 Jul 6, 2023
306ff1b
Add a kill_and_return_output() method for tests
teor2345 Jul 6, 2023
ae4def6
Add a test for new_state_format() versions (no upgrades or downgrades)
teor2345 Jul 6, 2023
c5b476f
Add use_internet_connection to can_spawn_zebrad_for_test_type()
teor2345 Jul 6, 2023
b1831db
Fix workflow parameter passing
teor2345 Jul 6, 2023
219c5b5
Check that reopening a new database doesn't upgrade (or downgrade) th…
teor2345 Jul 6, 2023
29b7da3
Allow ephemeral to be set to false even if we don't have a cached state
teor2345 Jul 6, 2023
fb96389
Add a test type that will accept any kind of state
teor2345 Jul 6, 2023
3c4d113
When re-using a directory, configure the state test config with that …
teor2345 Jul 7, 2023
bf0550f
Actually mark newly created databases with their format versions
teor2345 Jul 7, 2023
6d251b0
Wait for the state to be opened before testing the format
teor2345 Jul 7, 2023
1176b4d
Run state format tests on mainnet and testnet configs (no network acc…
teor2345 Jul 7, 2023
f302f55
run multiple reopens in tests
teor2345 Jul 7, 2023
8137d37
Test upgrades run correctly
teor2345 Jul 7, 2023
c3abfc0
Test that version downgrades work as expected (best effort)
teor2345 Jul 7, 2023
c189e6f
Add a TODO for testing partial updates
teor2345 Jul 7, 2023
ae806ba
Fix missing test arguments
teor2345 Jul 7, 2023
196f288
clippy if chain
teor2345 Jul 7, 2023
74ce5bf
Fix typo
teor2345 Jul 7, 2023
08444e8
another typo
teor2345 Jul 7, 2023
f7ed362
Pass a database instance to the format upgrade task
teor2345 Jul 9, 2023
adbb202
Fix a timing issue in the tests
teor2345 Jul 9, 2023
20e642e
Fix version matching in CI
teor2345 Jul 9, 2023
3455327
Use correct env var reference
teor2345 Jul 9, 2023
4c3fa5c
Use correct github env file
teor2345 Jul 9, 2023
9c12699
Wait for the database to be written before killing Zebra
teor2345 Jul 9, 2023
7b9a0ae
Use correct workflow syntax
teor2345 Jul 10, 2023
99359eb
Version changes aren't always upgrades
teor2345 Jul 12, 2023
ff79604
Merge branch 'main' into db-format-update-task
mergify[bot] Jul 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zebra-state/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub const DATABASE_FORMAT_MINOR_VERSION: u64 = 0;

/// The database format patch version, incremented each time the on-disk database format has a
/// significant format compatibility fix.
pub const DATABASE_FORMAT_PATCH_VERSION: u64 = 1;
pub const DATABASE_FORMAT_PATCH_VERSION: u64 = 2;
arya2 marked this conversation as resolved.
Show resolved Hide resolved

/// The name of the file containing the minor and patch database versions.
pub const DATABASE_FORMAT_VERSION_FILE_NAME: &str = "version";
Expand Down