Log and count protected upsert revert failures - #19505
Open
KKcorps wants to merge 7 commits into
Open
Conversation
KKcorps
marked this pull request as draft
September 8, 2026 09:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19505 +/- ##
============================================
+ Coverage 67.73% 67.75% +0.01%
Complexity 1430 1430
============================================
Files 3489 3489
Lines 224637 224682 +45
Branches 35468 35468
============================================
+ Hits 152160 152227 +67
Misses 60450 60450
+ Partials 12027 12005 -22
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:
|
KKcorps
marked this pull request as ready for review
September 9, 2026 14:14
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.
PR flow
Add logging and metering for protected upsert revert failures in base and concurrent map handlers, preserving existing exception propagation or key removal.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Diff evidence
Protected upsert revert can lose a previous key location while the existing ConcurrentMap
reader/bitmap fallback still completes normally. Add
UPSERT_METADATA_REVERT_FAILURESand theUPSERT_METADATA_REVERT_FAILEDlog marker to those handled fallbacks and to exceptions alreadyescaping the protected revert operation.
Preserve existing OSS behavior: handled fallbacks still remove the key and return normally;
unhandled runtime exceptions still propagate unchanged. No new segment-error-cache writes,
Helix state changes, query fences, or ingestion gates are added.
doOffload()is unchanged.The existing eligibility check requires
PROTECTEDmode, a mutable segment, and a tableconfiguration needing revert (partial upsert,
dropOutOfOrderRecord, or an out-of-order recordcolumn). Ordinary removal paths are unchanged. The meter counts failure events, not distinct
segments; one segment can have several key fallbacks. Successful reverts do not increment it.
The signals identify suspect metadata; they do not repair it. Manual reconstruction and replay
remain the recovery procedure, including later sequences in the affected partition for pauseless
partial upsert. The operator runbook is maintained separately from this PR.
Validation: 64 OSS tests passed:
ConcurrentMapPartitionUpsertMetadataManagerTest(34) andRealtimeSegmentDataManagerTest(30). Five added cases cover protected removal/replacement reporting,a non-protected control, and the handled reader/bitmap fallbacks. Existing exception objects and
key-removal behavior are preserved without segment-error-cache writes. No cluster recovery test or
benchmark was run. Spotless, Checkstyle, license checks and git diff --check passed.