-
Notifications
You must be signed in to change notification settings - Fork 3
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: Various Control Plane migration fixes #552
Conversation
ca95d01
to
b7f3562
Compare
@@ -34,16 +34,17 @@ impl RedisClientImpl { | |||
}) | |||
} | |||
|
|||
pub async fn get<T, U>(&self, key: T) -> anyhow::Result<U> | |||
pub async fn get<T, U>(&self, key: T) -> anyhow::Result<Option<U>> |
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.
Not actually directly related, but quite a nice change to have
#[derive(serde::Deserialize, serde::Serialize, Debug)] | ||
struct DenylistEntry { | ||
account_id: AccountId, | ||
v1_ack: bool, | ||
migrated: bool, |
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.
This can still be deserialized without these fields, but it means they will be removed when serializing again.
@@ -104,8 +113,7 @@ async fn migrate_account( | |||
.context("Failed to merge streams")?; | |||
} | |||
|
|||
// TODO Uncomment when V2 correctly continues from V1 stop point | |||
// set_migrated_flag(redis_client, account_id)?; | |||
set_migrated_flag(redis_client, account_id)?; |
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.
We need to set the migrated
flag to prevent further attempts to migrate
@@ -14,12 +14,17 @@ pub struct AllowlistEntry { | |||
v1_ack: bool, | |||
migrated: bool, | |||
failed: bool, | |||
v2_control: bool, |
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.
Since we have to set the migrated
flag, this allows us to still prevent V2 from taking control. Providing time to sanity check the migration itself.
b7f3562
to
0ddbb6e
Compare
Going to merge these to unblock testing - feel free to review in retrospect |
No description provided.