You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added option to enable/disable specific users for compaction. (#3385)
* Added option to enable/disable specific users for compaction.
Signed-off-by: Peter Štibraný <[email protected]>
* Log list of enabled/disabled users on startup.
Signed-off-by: Peter Štibraný <[email protected]>
* Always check if compactor owns the user.
Signed-off-by: Peter Štibraný <[email protected]>
* Make new flags visible in the documentation. Added CHANGELOG.
Signed-off-by: Peter Štibraný <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,7 @@
87
87
*[ENHANCEMENT] Added `cortex_alertmanager_config_last_reload_successful_seconds` metric to show timestamp of last successful AM config reload. #3289
88
88
*[ENHANCEMENT] Blocks storage: reduced number of bucket listing operations to list block content (applies to newly created blocks only). #3363
89
89
*[ENHANCEMENT] Ruler: Include the tenant ID on the notifier logs. #3372
90
+
*[ENHANCEMENT] Blocks storage Compactor: Added `-compactor.enabled-tenants` and `-compactor.disabled-tenants` to explicitly enable or disable compaction of specific tenants. #3385
90
91
*[BUGFIX] No-longer-needed ingester operations for queries triggered by queriers and rulers are now canceled. #3178
91
92
*[BUGFIX] Ruler: directories in the configured `rules-path` will be removed on startup and shutdown in order to ensure they don't persist between runs. #3195
92
93
*[BUGFIX] Handle hash-collisions in the query path. #3192
"If not 0, blocks will be marked for deletion and compactor component will delete blocks marked for deletion from the bucket. "+
72
76
"If delete-delay is 0, blocks will be deleted straight away. Note that deleting blocks immediately can cause query failures, "+
73
77
"if store gateway still has the block loaded, or compactor is ignoring the deletion because it's compacting the block at the same time.")
78
+
79
+
f.Var(&cfg.EnabledTenants, "compactor.enabled-tenants", "Comma separated list of tenants that can be compacted. If specified, only these tenants will be compacted by compactor, otherwise all tenants can be compacted. Subject to sharding.")
80
+
f.Var(&cfg.DisabledTenants, "compactor.disabled-tenants", "Comma separated list of tenants that cannot be compacted by this compactor. If specified, and compactor would normally pick given tenant for compaction (via -compactor.enabled-tenants or sharding), it will be ignored instead.")
74
81
}
75
82
76
83
// Compactor is a multi-tenant TSDB blocks compactor based on Thanos.
@@ -83,6 +90,12 @@ type Compactor struct {
83
90
parentLogger log.Logger
84
91
registerer prometheus.Registerer
85
92
93
+
// If empty, all users are enabled. If not empty, only users in the map are enabled (possibly owned by compactor, also subject to sharding configuration).
94
+
enabledUsersmap[string]struct{}
95
+
96
+
// If empty, no users are disabled. If not empty, users in the map are disabled (not owned by this compactor).
97
+
disabledUsersmap[string]struct{}
98
+
86
99
// Function that creates bucket client and TSDB compactor using the context.
0 commit comments