Skip to content

tsdb/index: export sentinel errors for size limit failures#17773

Merged
aknuds1 merged 2 commits intoprometheus:mainfrom
pr00se:index-size-errors
Jan 6, 2026
Merged

tsdb/index: export sentinel errors for size limit failures#17773
aknuds1 merged 2 commits intoprometheus:mainfrom
pr00se:index-size-errors

Conversation

@pr00se
Copy link
Contributor

@pr00se pr00se commented Jan 2, 2026

We want to detect and handle some unrecoverable TSDB errors, but don't want to rely on string matching the error message. This PR replaces the error strings with error values that can be detected using errors.Is.

I don't think this change needs a CHANGELOG, as the change isn't user-facing.

Which issue(s) does the PR fix:

Does this PR introduce a user-facing change?

NONE

Signed-off-by: Patryk Prus <p@trykpr.us>
@pr00se pr00se force-pushed the index-size-errors branch from a13ce01 to ec8c268 Compare January 2, 2026 21:15
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

Looks mainly good, but please see my suggestion for backwards compatibility.

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: Patryk Prus <p@trykpr.us>
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

Looks like a nice improvement, thanks!

@aknuds1 aknuds1 merged commit dcda484 into prometheus:main Jan 6, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants