-
Notifications
You must be signed in to change notification settings - Fork 532
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
ingester: reduce active series when series change owner #8084
ingester: reduce active series when series change owner #8084
Conversation
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.
Looks good, thank you.
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.
A couple nits, but otherwise LGTM. Thanks!
CHANGELOG.md
Outdated
@@ -32,6 +32,7 @@ | |||
* [ENHANCEMENT] OTLP: Improve remote write format translation performance by using label set hashes for metric identifiers instead of string based ones. #8012 | |||
* [ENHANCEMENT] Querying: Remove OpEmptyMatch from regex concatenations. #8012 | |||
* [ENHANCEMENT] Store-gateway: add `-blocks-storage.bucket-store.max-concurrent-queue-timeout`. When set, queries at the store-gateway's query gate will not wait longer than that to execute. If a query reaches the wait timeout, then the querier will retry the blocks on a different store-gateway. If all store-gateways are unavailable, then the query will fail with `err-mimir-store-consistency-check-failed`. #7777 | |||
* [ENHANCEMENT] Ingester: active series are now updated along with owned series. They decrease when series change ownership between ingesters. This helps provide a more accurate total of active series when ingesters are added. #8084 |
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.
Should we specifically call out here that this is only enabled if the owned series flags (ingester.track-ingester-owned-series
or ingester.use-ingester-owned-series-for-limits
) are enabled?
Maybe it's enough to change it to "when owned series are enabled, active series are now..."?
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.
I mentioned the two flags. This makes the changelog a bit more self-sufficient to digest new changes
|
||
// since no reason set, shard size and local limit are unchanged, and we pass ringChanged=false, no recompute will happen | ||
c.updateOwnedSeriesAndCheckResult(t, false, 0, "") | ||
c.checkTestedIngesterOwnedSeriesState(t, ownedServiceSeriesCount, 1, ownedServiceTestUserSeriesLimit) | ||
c.checkUpdateReasonForUser(t, "") | ||
c.checkActiveSeriesCount(t, ownedServiceSeriesCount) | ||
|
||
// passing ringChanged=true will trigger recompute because the token ownership has changed | ||
c.updateOwnedSeriesAndCheckResult(t, true, 1, recomputeOwnedSeriesReasonRingChanged) |
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.
should we check that active series go to 0 in this block?
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.
nice catch; the assertion was already in the partitions test case, but I had missed it for the classic ring. See 5acfce5
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
e40be24
to
75e3ece
Compare
* calculate owned active series in owned series loop Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Support clearing active series Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Update owned series tests Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add test for early head compaction Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add CHANGELOG.md entry Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Apply suggestions from code review Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com> * Clarify CHANGELOG.md Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add missing assertion Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Fix typo Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com>
What this PR does
Couples updates to owned series with updates to active series. If a series is no longer owned, it is no longer counted as an active series. The exception to that is during early head compaction: the series are still active even if they are removed from the head.
Which issue(s) this PR fixes or relates to
Fixes #7976
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.