Skip to content
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

Bugfix: Improved handling of complete blocks in localblocks processor after enabling flushing #3805

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

mapno
Copy link
Member

@mapno mapno commented Jun 24, 2024

What this PR does:

This fix addresses an issue where complete blocks were not being properly processed in the localblocks processor. Before, complete blocks were kept for longer than necessary. This was a problem specially when enabling flushing to storage for the first time.

The condition for deleting complete blocks has been changed to be based on block end time. If the block has been flushed and it's past it the cutoff time, it's deleted.

Checklist

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

This fix addresses an issue where old blocks were not being properly processed in the localblocks processor.
The changes include updates to the deleteOldBlocks function to ensure that blocks that have exceeded the CompleteBlockTimeout are correctly identified and deleted.
This prevents unnecessary accumulation of old blocks.
@mapno mapno changed the title Bugfix: Improved handling of old blocks in localblocks processo Bugfix: Improved handling of old blocks in localblocks processor after enabling flushing Jun 24, 2024
@mapno mapno changed the title Bugfix: Improved handling of old blocks in localblocks processor after enabling flushing Bugfix: Improved handling of complete blocks in localblocks processor after enabling flushing Jun 24, 2024
@mapno mapno marked this pull request as ready for review June 24, 2024 15:39
CHANGELOG.md Outdated Show resolved Hide resolved
@mapno mapno merged commit 96a5610 into grafana:main Jun 25, 2024
14 checks passed
@mapno mapno deleted the localblocks-delete-old-blocks-bugfix branch June 25, 2024 06:53
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