Skip to content

[backend-scheduler] require minimum time between tenant sorting#5410

Merged
zalegrala merged 9 commits intografana:mainfrom
zalegrala:compactionProviderMinCycleTime
Jul 17, 2025
Merged

[backend-scheduler] require minimum time between tenant sorting#5410
zalegrala merged 9 commits intografana:mainfrom
zalegrala:compactionProviderMinCycleTime

Conversation

@zalegrala
Copy link
Copy Markdown
Contributor

@zalegrala zalegrala commented Jul 15, 2025

What this PR does:

Here we use a minimum cycle time to ensure we move fast when we can, but not too fast when we don't need to.

New blocks arrive at the end of a poll cycle, and we shouldn't expect to find new work on a tenant which has been drained until then.

BREAKING CHANGE
The config setting provider.compaction.backoff has been removed in favor of this simplified approach.

Additionally the compaction_tenant_backoff_total metric has been renamed to compaction_empty_tenant_cycle_total for clarity.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Comment thread modules/backendscheduler/provider/compaction.go Outdated
Comment thread modules/backendscheduler/provider/config.go Outdated
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

nice simplification. likely easier to predict behavior here?

Comment thread modules/backendscheduler/provider/compaction.go Outdated
Comment thread modules/backendscheduler/provider/compaction.go
Comment thread modules/backendscheduler/provider/config.go Outdated
@zalegrala
Copy link
Copy Markdown
Contributor Author

More predictable and improved behavior. Thanks for the review.

@zalegrala zalegrala merged commit 05ba9e6 into grafana:main Jul 17, 2025
37 of 38 checks passed
@zalegrala zalegrala deleted the compactionProviderMinCycleTime branch July 17, 2025 22:35
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