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

Open shards metrics was only updated on scale up/down. #4721

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

fulmicoton
Copy link
Contributor

@fulmicoton fulmicoton commented Mar 13, 2024

This PR also removes the source id label (as it will always be ingest
v2). This is not much of a win since the overall metric cardinality does
not change.

It also removes .all_shards_mut() which was error-prone
as a client could break all kinds of invariants.

@fulmicoton fulmicoton requested a review from guilload March 13, 2024 02:08
@fulmicoton fulmicoton force-pushed the bug-open-shards-metrics-invalid branch 2 times, most recently from 339d9c4 to 82f7748 Compare March 13, 2024 02:18
This PR also removes the source id label (as it will always be ingest
v2). This is not much of a win since the overall metric cardinality does
not change.

It also removes `.all_shards_mut()` which was error-prone
as a client could break all kinds of invariants.
@fulmicoton fulmicoton force-pushed the bug-open-shards-metrics-invalid branch from 82f7748 to dbedc29 Compare March 13, 2024 02:29
@@ -513,6 +513,7 @@ impl Handler<DeleteIndexRequest> for ControlPlane {
ctx: &ActorContext<Self>,
) -> Result<Self::Reply, ActorExitStatus> {
let index_uid: IndexUid = request.index_uid().clone();
info!(index=%index_uid, "delete index");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add rather put those statements after the successful op.

@@ -62,7 +62,7 @@ impl Default for ControlPlaneMetrics {
"Number of open shards per source.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Number of open shards per source.",
"Number of open shards per indexer.",

@guilload guilload merged commit fd497bd into main Mar 13, 2024
4 checks passed
@guilload guilload deleted the bug-open-shards-metrics-invalid branch March 13, 2024 15:50
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.

2 participants