-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
compaction: Separate metrics for tracking retention and compaction #11263
Conversation
Trivy scan found the following vulnerabilities:
|
pkg/compactor/compactor.go
Outdated
@@ -614,6 +616,8 @@ func (c *Compactor) CompactTable(ctx context.Context, tableName string, applyRet | |||
// wait for lock to be released since we can't mark delete requests as processed without checking all the tables | |||
select { | |||
case <-lockWaiterChan: | |||
// refresh index list cache since the compaction would have changed the index files in the object store | |||
sc.indexStorageClient.RefreshIndexTableNamesCache(ctx) |
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.
we refresh the table here, is this still required when compacting a table?
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.
ahh, right, this one is not required. Will remove it.
pkg/compactor/compactor.go
Outdated
@@ -126,6 +126,8 @@ func (cfg *Config) Validate() error { | |||
|
|||
if cfg.ApplyRetentionInterval == 0 { | |||
cfg.ApplyRetentionInterval = cfg.CompactionInterval | |||
// add some jitter to avoid running retention and compaction at same time | |||
cfg.ApplyRetentionInterval += cfg.CompactionInterval / 2 |
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.
nit: should we instead add a jitter to when the first retention kicks in?
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 would like to add jitter only if both retention and compaction have the same frequency. I will update the code a bit.
…11263) **What this PR does / why we need it**: In PR #9884, we separated the retention loop from compaction to avoid blocking compaction for too long due to some intensive delete requests. Currently, we track retention and compaction using the same metrics. This PR adds separate metrics for monitoring retention operation. I have also updated the Retention dashboard to use the new metrics.
With this update we get: - Reworked retention dashboards done in grafana#11263 as a follow-up to grafana#9884 - New write dashboards for structured metadata done in grafana#11087
…rafana#11263) **What this PR does / why we need it**: In PR grafana#9884, we separated the retention loop from compaction to avoid blocking compaction for too long due to some intensive delete requests. Currently, we track retention and compaction using the same metrics. This PR adds separate metrics for monitoring retention operation. I have also updated the Retention dashboard to use the new metrics.
What this PR does / why we need it:
In PR #9884, we separated the retention loop from compaction to avoid blocking compaction for too long due to some intensive delete requests. Currently, we track retention and compaction using the same metrics. This PR adds separate metrics for monitoring retention operation. I have also updated the Retention dashboard to use the new metrics.