Open
Conversation
narqo
added a commit
that referenced
this pull request
Feb 13, 2026
#### What this PR does This PR moves the per-tenant `TSDBMetrics` collector out of the `ingester` package to allow these metrics to be re-used in the block-builder (I've moved the changes in the `blockbuilder` package are to [a separate PR](#14364), to simplify the review). The changes here are aimed to be pure structural. I don't expect any changes in the existing metrics — currently testing that in a dev environment, and all relevant metrics look fine. --------- Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
9db16f1 to
7c840c7
Compare
|
Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.
Or push these changes by commenting: Preview (8467778f39)diff --git a/pkg/blockbuilder/tsdb.go b/pkg/blockbuilder/tsdb.go
--- a/pkg/blockbuilder/tsdb.go
+++ b/pkg/blockbuilder/tsdb.go
@@ -480,6 +480,11 @@
merr.Add(os.RemoveAll(dbDir))
}
+ // Remove all registered per-tenant TSDB metrics. Their local DBs are wiped out from the block-builder no-matter what.
+ for tenant := range b.tsdbs {
+ b.tsdbMetrics.RemoveRegistryForTenant(tenant.tenantID)
+ }
+
// Clear the map so that it can be released from the memory. Not setting to nil in case
// we want to reuse the TSDBBuilder.
b.tsdbs = make(map[tsdbTenant]*userTSDB) |
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
7c840c7 to
4cec80d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this PR does
Following #14363
This PR exposes per-tenant TSDB metrics from the block-builder.