Skip to content

receiver: ignore lost+found directory during tenant discovery - #8800

Closed
NamanKu-tech wants to merge 2 commits into
thanos-io:mainfrom
NamanKu-tech:fix/issue-8798-receiver-ignore-lost-found
Closed

receiver: ignore lost+found directory during tenant discovery#8800
NamanKu-tech wants to merge 2 commits into
thanos-io:mainfrom
NamanKu-tech:fix/issue-8798-receiver-ignore-lost-found

Conversation

@NamanKu-tech

Copy link
Copy Markdown

Closes #8798

What changed

The receiver now ignores the lost+found directory when scanning for tenants. Previously, it would treat this directory as a tenant and create TSDB files within it, which is incorrect.

Changes made:

  1. Added checks in MultiTSDB.Open() to skip the lost+found directory
  2. Added checks in MultiTSDB.RemoveLockFilesIfAny() to skip the lost+found directory
  3. Added a unit test TestMultiTSDBIgnoresLostFoundDirectory to verify the fix

Testing

  • Unit test added to verify lost+found is ignored
  • Existing test suite passes
  • Follows CONTRIBUTING.md style guidelines

The receiver would treat the lost+found directory as a tenant when
scanning the tsdb.path, causing it to create TSDB files and logs for
it. This directory should be skipped like other non-tenant directories.

Fixes: thanos-io#8798

Signed-off-by: NamanKu-tech
Adds a unit test to verify that the lost+found directory is
successfully ignored during tenant discovery in MultiTSDB.Open().

Signed-off-by: NamanKu-tech
@GiedriusS

Copy link
Copy Markdown
Member

Fixed in another PR. Thanks for your contribution.

@GiedriusS GiedriusS closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thanos receiver should ignore "lost+found" directory

2 participants