Skip to content

tempodb: tolerate blocks removed during local listing - #7712

Open
arkoc wants to merge 1 commit into
grafana:mainfrom
arkoc:fix/local-backend-list-retention-race
Open

tempodb: tolerate blocks removed during local listing#7712
arkoc wants to merge 1 commit into
grafana:mainfrom
arkoc:fix/local-backend-list-retention-race

Conversation

@arkoc

@arkoc arkoc commented Aug 10, 2026

Copy link
Copy Markdown

What this fixes

The local backend blocklist poll and retention run on the same interval. When retention removes a compacted block directory while ListBlocks is walking the tenant directory, fs.WalkDir reports fs.ErrNotExist for that child and the entire tenant poll fails.

A concurrently removed child is no longer part of the blocklist, so this change skips only fs.ErrNotExist below the tenant root. Errors opening the tenant root and all other filesystem errors still fail the poll.

This was observed on v2.9.0, and the affected ListBlocks implementation is also present on release-v2.9. A backport would make the fix available to 2.9 users.

Testing

  • Added a regression test that continuously removes and recreates a block while ListBlocks runs. It reliably fails before this change with open UUID: no such file or directory.
  • go test -race ./tempodb/backend/local -run TestListBlocks -count=20
  • go test ./tempodb/backend/...

Signed-off-by: Aram Kocharyan <aram.koch@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Signed commits report

1 of 1 commit between main and fix/local-backend-list-retention-race could not be fully verified:

Commit Author Reason Message
ce4e6c2b Aram Kocharyan unsigned tempodb: tolerate blocks removed during local listing

This repository requires all commits to be signed. See GitHub docs on commit signature verification.

@cla-assistant

cla-assistant Bot commented Aug 10, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Aug 10, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

1 participant