-
Notifications
You must be signed in to change notification settings - Fork 514
INC-1252: Clean up adapter metrics keyed by clusters #38640
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
Changes from all commits
f7fb5a1
595b01f
55f4c81
c344479
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1030,6 +1030,10 @@ impl Coordinator { | |
| self.drop_vpc_endpoints_in_background(vpc_endpoints_to_drop) | ||
| } | ||
|
|
||
| let clusters_losing_replicas: BTreeSet<_> = cluster_replicas_to_drop | ||
| .iter() | ||
| .map(|(cluster_id, _)| *cluster_id) | ||
| .collect(); | ||
| if !cluster_replicas_to_drop.is_empty() { | ||
| fail::fail_point!("after_catalog_drop_replica"); | ||
|
|
||
|
|
@@ -1038,8 +1042,20 @@ impl Coordinator { | |
| } | ||
| } | ||
| if !clusters_to_drop.is_empty() { | ||
| for cluster_id in clusters_to_drop { | ||
| self.controller.drop_cluster(cluster_id); | ||
| for cluster_id in &clusters_to_drop { | ||
| self.controller.drop_cluster(*cluster_id); | ||
| } | ||
| } | ||
| // A dropped cluster, or one left without replicas, cannot serve | ||
| // peeks, so its peek series are stale. They come back on the first | ||
| // peek once a cluster has a replica again. | ||
| for cluster_id in clusters_losing_replicas.into_iter().chain(clusters_to_drop) { | ||
| let has_replicas = self | ||
| .catalog() | ||
| .try_get_cluster(cluster_id) | ||
| .is_some_and(|cluster| cluster.replicas().next().is_some()); | ||
| if !has_replicas { | ||
| self.metrics.by_cluster.remove_cluster(cluster_id); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where we remove ... but I'm curious is it possible that we drop all the replicas and then add them back.. where does the metric get registered again?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup it's still possible. This can be done by setting the replication factor to 0 then back to >=1. However everything's still on the same cluster! We always key by cluster ID. |
||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.