-
Notifications
You must be signed in to change notification settings - Fork 305
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
upgrades: write a migration script for #4084 #4108
Conversation
Something to note is that in this case, we can get away with using a prefix query because we're not trying to capture a range, but in the future we might to run more complex migrations that operate over a specific block window. We could do prefix+filtering but this might end up being much more expensive than a range query still. I am running a test on a private chain, if it works we can leave it as is. Otherwise, we'll fallback on the |
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. Intentionally not merging so that we can coordinate timing carefully.
@@ -13,7 +13,7 @@ use cnidarium::{StateDelta, Storage}; | |||
use metrics_exporter_prometheus::PrometheusBuilder; | |||
use pd::{ | |||
cli::{Opt, RootCommand, TestnetCommand}, | |||
migrate::Migration::SimpleMigration, | |||
migrate::Migration::Testnet70, |
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.
Nit: should this be Testnet71? That would make it clearer that we expect it to ship with v0.71.0
. It's not exposed to operators, so we just need to keep the terminology straight ourselves.
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.
SG, my reasoning was 70 -> 71, but the other way around works too
This implements a migration for #4084 and makes it the default command in
pd migrate
.