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

fix: Various Control Plane migration fixes #552

Merged
merged 6 commits into from Feb 6, 2024

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Feb 6, 2024

No description provided.

@morgsmccauley morgsmccauley force-pushed the fix/control-plane-migration branch 2 times, most recently from ca95d01 to b7f3562 Compare February 6, 2024 22:05
@@ -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>>
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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)?;
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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.

@morgsmccauley morgsmccauley changed the title fix/control plane migration fix: Various Control Plane migration fixes Feb 6, 2024
@morgsmccauley morgsmccauley marked this pull request as ready for review February 6, 2024 22:13
@morgsmccauley morgsmccauley requested a review from a team as a code owner February 6, 2024 22:13
@morgsmccauley morgsmccauley linked an issue Feb 6, 2024 that may be closed by this pull request
@morgsmccauley
Copy link
Collaborator Author

Going to merge these to unblock testing - feel free to review in retrospect

@morgsmccauley morgsmccauley merged commit 305fc0d into main Feb 6, 2024
8 checks passed
@morgsmccauley morgsmccauley deleted the fix/control-plane-migration branch February 6, 2024 22:21
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.

Migrate Indexers to Control Plane
1 participant