compactv2: propagate series set error in RelabelModifier - #8937
Open
aeron-gh wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@fpetkovski |
aeron-gh
force-pushed
the
fix-relabel-modifier-set-err
branch
from
July 27, 2026 18:42
7221949 to
96a687a
Compare
Contributor
Author
|
@GiedriusS |
Member
|
Hi, there's no rush. Please be patient. |
Signed-off-by: aeron-gh <agab0323@gmail.com>
aeron-gh
force-pushed
the
fix-relabel-modifier-set-err
branch
from
August 14, 2026 08:55
96a687a to
1ae7847
Compare
Contributor
Author
@GiedriusS |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8937 +/- ##
=======================================
Coverage 64.50% 64.50%
=======================================
Files 289 289
Lines 37352 37354 +2
=======================================
+ Hits 24094 24096 +2
+ Misses 11160 11158 -2
- Partials 2098 2100 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
thanos tools bucket rewrite --rewrite.to-relabel-configcan write a block that is missing data and report success while doing it.RelabelModifier.Modifydrains the sourceChunkSeriesSetinto maps and builds a newlistChunkSeriesSetfrom what it collected, but it never checksset.Err().Next()returns false on failure as well as on completion, so if reading the source block fails partway through, the loop simply ends andModifyreturns a normal looking result holding only the series it read before the failure. The caller then writes that out as the new block.Three things in the same package suggest this is an oversight rather than intentional:
errorOnlyStringIterwhen it failsDeletionModifierpropagates the source error throughdelModifierSeriesSet.Err(), which forwardsd.ChunkSeriesSet.Err().RelabelModifiercannot rely on that because it returns a brand new set, so it has to check explicitlycompactor.godoes checkset.Err(), so a dry run surfaces the failure today while the actual rewrite does notFixes #8933
Changes
RelabelModifier.Modify, reusing theerrorOnlyStringIterpath the function already uses for chunk iterator errors.Verification
go buildpasses onpkg/compactv2.go vetreports only two pre-existingstdmethodswarnings on lines this change does not touch.