Add missingFileExceptions counter to detect swallowed HDFS replica errors - #260
Closed
tanyastickles wants to merge 2 commits into
Closed
tanyastickles wants to merge 2 commits into
tanyastickles wants to merge 2 commits into
Conversation
…rors
ReplicaNotFoundException and StoreFileNotFoundException are caught inside
the broad Exception handler in StoreScanner#trySwitchToStreamRead and only
appear in RS logs at WARN level — they never propagate to the client and
are invisible to existing alerting. This counter makes them observable via
the existing IPC JMX exception metrics, which collectd already scrapes as
collectd_hbase_exceptions_identified_total{type="missingFileExceptions"}.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing — branch name contained a slash which corrupted the Maven snapshot version in the RPM build. Reopening from tstickles-missing-file-exception-metrics. |
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.
Description
ReplicaNotFoundExceptionandStoreFileNotFoundExceptionare caught inside the broadExceptionhandler inStoreScanner#trySwitchToStreamReadand only surface in RS logs at WARN level — they never propagate to the HBase client and are completely invisible to existing alerting. During a stream-read mode switch the RS seeks newly-opened HFile scanners back to their last position; an HDFS block-read failure (e.g. a missing replica) throws here, the switch is silently abandoned, and the scan continues on the old pread scanners. No data is lost, but the event is unobservable.This change adds a
missingFileExceptionscounter to the existing IPC exception metrics infrastructure. BecauseReplicaNotFoundExceptionis an HDFS server-side class not on the HBase classpath, detection walks the cause-chain checking message strings. The collectd plugin already scrapes allexceptions.*attributes from the RegionServer IPC JMX bean, so the new counter lands in VictoriaMetrics automatically ascollectd_hbase_exceptions_identified_total{type="missingFileExceptions"}with no changes needed outside this repo.Issue
BRAVE
Backwards Compatibility
Counter is additive — new JMX attribute registered in
ExceptionTrackingSourceImpl.init(). No existing attributes removed or renamed.Rollout and Rollback Plan
No config flag needed. Counter starts at zero and increments only on the specific exception message pattern. Rollback is a revert.
Automated Testing
Verification
After deploy: query
collectd_hbase_exceptions_identified_total{type="missingFileExceptions"}in VictoriaMetrics on saturn-hb2-a-prod and confirm the metric appears (value may be zero if no events since deploy).Expect Dependencies to Fail
REVIEWERS: Please review both the code changes and the answers above, and validate that they match the expectations for BRAVE