Skip to content

Fix retention to immediately update the in-memory blocklists for changes - #1389

Merged
mdisibio merged 2 commits into
grafana:mainfrom
mdisibio:retention-race-fix
Apr 18, 2022
Merged

Fix retention to immediately update the in-memory blocklists for changes#1389
mdisibio merged 2 commits into
grafana:mainfrom
mdisibio:retention-race-fix

Conversation

@mdisibio

Copy link
Copy Markdown
Contributor

What this PR does:
This PR fixes retention to immediately update the in-memory blocklist for changes. This prevents errors if retention runs twice before the next polling cycle, where it would try to retain the same block twice.

Note - We already do this after compaction, but it only added compactedMeta. Now we are removing too, so there is a new function param and test cases in blocklist.Update.

Which issue(s) this PR fixes:
Fixes part of #1372

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@mdisibio mdisibio added this to the v1.4 milestone Apr 15, 2022
@joe-elliott joe-elliott mentioned this pull request Apr 15, 2022
3 tasks

@joe-elliott joe-elliott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good! minor request if you have a second, but no worries if you just want to click that big green button

Comment thread tempodb/blocklist/list.go
@mdisibio
mdisibio merged commit da37526 into grafana:main Apr 18, 2022
@mdisibio
mdisibio deleted the retention-race-fix branch April 25, 2023 18:50
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
…ges (grafana#1389)

* Fix retention to immediately update the in-memory blocklists for changes

* add missing break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants