Skip recently committed (COMMITTING) segments in SegmentStatusChecker#18934
Draft
krishan1390 wants to merge 1 commit into
Draft
Skip recently committed (COMMITTING) segments in SegmentStatusChecker#18934krishan1390 wants to merge 1 commit into
krishan1390 wants to merge 1 commit into
Conversation
SegmentStatusChecker's "skip recently created/pushed segments" logic predated the pauseless COMMITTING status and only special-cased IN_PROGRESS. A COMMITTING segment (consumed but still being built and uploaded by the server) therefore: - fell into the push-time branch, and since realtime segments have no push time, was never skipped during the wait-for-push grace period, so it was counted as under-replicated/offline while servers were still loading it; and - was subjected to start/end time-range validation even though start and end time are only finalized once the segment becomes DONE, so it was flagged with an invalid time range. Both checks now key off Status.isCompleted() (DONE/UPLOADED), so IN_PROGRESS and COMMITTING segments are handled the same way, removing the false alerts and log noise for pauseless tables. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18934 +/- ##
============================================
- Coverage 64.89% 64.89% -0.01%
Complexity 1347 1347
============================================
Files 3398 3398
Lines 212550 212550
Branches 33503 33503
============================================
- Hits 137927 137926 -1
- Misses 63481 63489 +8
+ Partials 11142 11135 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
noob-se7en
approved these changes
Jul 8, 2026
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.
Summary
SegmentStatusChecker's logic to skip recently created/pushed segments predates the pauselessCOMMITTINGstatus and only special-casedIN_PROGRESS. As a result, aCOMMITTINGsegment — onethat has finished consuming but is still being built and uploaded by the server on a pauseless
table — was mishandled in two places in
updateSegmentMetrics:getStatus() == IN_PROGRESS ? getCreationTime() : getPushTime(). A realtimeCOMMITTINGsegmenthas no push time, so
getPushTime()returnsLong.MIN_VALUEand the segment is never skipped.While servers are still loading it, it gets counted as under-replicated/offline
(
SEGMENTS_WITH_LESS_REPLICAS,PERCENT_SEGMENTS_AVAILABLE < 100) and produces WARN log spam.getStatus() != IN_PROGRESS. ACOMMITTINGsegment'sstart/end time is only finalized once it becomes
DONE, so it was flagged asSEGMENTS_WITH_INVALID_START_TIME/SEGMENTS_WITH_INVALID_END_TIME.Fix
Both checks now key off
Status.isCompleted()(true only forDONE/UPLOADED), soIN_PROGRESSand
COMMITTINGsegments are handled the same way. A recently committed segment gets thewait-for-push grace period and is not time-validated, while a genuinely stuck old
COMMITTINGsegment is still surfaced as under-replicated (but no longer as invalid-time noise).
Testing
Added
SegmentStatusCheckerTest#realtimeCommittingSegmentTest: a recently createdCOMMITTINGsegment is skipped entirely, while an older one is still checked for replica availability but never
flagged for an invalid time range. The test fails without the fix (
expected [1] but found [2])and passes with it. The full
SegmentStatusCheckerTestsuite (30 tests) passes.🤖 Generated with Claude Code