Add missingFileExceptions counter to detect swallowed HDFS replica errors - #261
Closed
tanyastickles wants to merge 328 commits into
Closed
tanyastickles wants to merge 328 commits into
tanyastickles wants to merge 328 commits into
Conversation
Signed-off by: Chandra Sekhar K <chandrasekhar188k@gmail.com> (cherry picked from commit 31520c7)
…safe (apache#7337) (apache#7347) Signed-off-by: Peng Lu <lupeng@apache.org> (cherry picked from commit e0cec31)
…processorHost (apache#7370) Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit 361a563)
Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit dfeddb3)
) Adds javadoc mentioning the concurrent usage and thread-safety need of FileCleanerDelegate#getDeletableFiles. Fixes a potential thread-safety issue in BackupHFileCleaner: this class tracks timestamps to block the deletion of recently loaded HFiles that might be needed for backup purposes. The timestamps were being registered from inside the concurrent method, which could result in recently added files getting deleted. Moved the timestamp registration to the postClean method, which is called only a single time per cleaner run, so recently loaded HFiles are in fact protected from deletion. Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
…rt (apache#7376) Signed-off-by: Istvan Toth <stoty@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit bab3df9)
…Files are archived during backup (apache#7346) (apache#7357) (apache#7359) Signed-off-by: Ray Mattingly <rmattingly@apache.org> Co-authored-by: Siddharth Khillon <sidkhillon24@gmail.com> Co-authored-by: Hernan Romer <nanug33@gmail.com> Co-authored-by: skhillon <skhillon@hubspot.com>
…fresh (apache#7387) (apache#7393) (apache#7395) Signed-off-by: Charles Connell <cconnell@apache.org> Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
…to SFT interface (apache#5939) (apache#7382) Signed-off-by: Andrew Purtell <apurtell@apache.org> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java hbase-server/src/main/java/org/apache/hadoop/hbase/util/ServerRegionReplicaUtil.java hbase-server/src/test/java/org/apache/hadoop/hbase/master/janitor/TestCatalogJanitor.java hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobFileCache.java hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestMobStoreCompaction.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MockHStoreFile.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionFileSystem.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java
…nd RELEASENOTES.md Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off by: Ray Mattingly <rmattingly@apache.org>
…job (apache#7198)" Compatibility issue, see JIRA This reverts commit 22ba3bf. Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Reviewed-by: Vaibhav Joshi <vjoshi@cloudera.com>
…o file creation in HRegion initialize (apache#7406) Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> Conflicts: hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/MetaFixer.java hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
…nd RELEASENOTES.md Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Andrew Purtell <apurtell@apache.org>
… job (apache#7198)" This reverts commit 3bed95f.
…ster (apache#7415) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Junegunn Choi <junegunn@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org> Reviewed-by: chaijunjie0101 <1340011734@qq.com> (cherry picked from commit eae2198)
…e bucket cache (apache#7399) Reviewed by: Kota-SH <shanmukhaharipriya@gmail.com> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…#7440) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nihal Jain <nihaljain@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org> (cherry picked from commit b911715)
…it (apache#7442) Signed-off-by: Nihal Jain <nihaljain@apache.org> (cherry picked from commit 7fd4057)
Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Nihal Jain <nihaljain@apache.org> (cherry picked from commit 144cd01)
…sable_rpc_throttle (apache#7448) (apache#7458) Signed-off-by: Nihal Jain <nihaljain@apache.org> Signed-off-by: Pankaj Kumar <pankajkumar@apache.org> Reviewed-by: Vaibhav Joshi <vjoshi@cloudera.com> (cherry picked from commit 59bd6b2) Co-authored-by: Liu Xiao <42756849+liuxiaocs7@users.noreply.github.com>
…ased Priority (apache#7425) (apache#7462) Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…#7466) Signed-off-by: Andrew Purtell <apurtell@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Aman Poonia <aman.poonia.29@gmail.com>
…upstream) simplify the interceptor Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
#210) Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
…n name changed, instead of failing RPC
…table mappings when using the bulk output option (not yet upstream)
Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
…#228) * Fix an issue with duplicated backups of inactive host WAL files * Skip meta region WAL files
… Region Info (not yet upstream) Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
… regions without moving (apache#7563) (apache#7611) (#232) (will be in 2.7) Signed-off-by: Ray Mattingly <rmattingly@apache.org> Co-authored-by: Alex Hughes <ajkh88@users.noreply.github.com> Co-authored-by: Alex Hughes <ahughes@hubspot.com>
…ith WAL Compression (not yet upstream) * Initial changes to allow partial cell read in WAL * Add tests * More tests * Add back comments * Remove redundant tests and simplify * Get tag value even if tag is out of bounds due to addition * Clean up a bit * Add explanatory comment * Initialize to empty * Resolve PR comment issue regarding LRU eviction for tags * Address PR review: two-phase rollback and remove unused dictType param Rollback in UndoableLRUDictionary previously restored nodes one at a time, doing remove/setContents/put on the content-based nodeToIndex HashMap. This could clobber entries when two nodes shared the same content during the restore (e.g., an evicted value re-added to a different slot). The fix restores all node state first, then rebuilds nodeToIndex from scratch. Also removes the unused dictType parameter from TagCompressionContext since every caller hardcodes LRUDictionary.class and we always need UndoableLRUDictionary for correctness. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: skhillon <skhillon@hubspot.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…deletes subsequent COMPLETE backups (not yet upstream) Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
…essors in region replication (CDC optimization) * Filter cell. extended attributes and split oversized batches in region replica replication Region replica replication was forwarding all extended attributes including large "cell."-prefixed ones added by CDC coprocessors that have no use for replicas. Strip these in replicate() before buffering to reduce memory and network overhead. Also add RPC size limit enforcement (matching HBaseInterClusterReplicationEndpoint) to split batches that exceed hbase.ipc.max.request.size, preventing permanently stalled replication. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix test compilation: add replicationRpcLimit parameter to test call sites Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add unit tests for splitBatches and extract as package-private static method Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove controller.reset() between batch RPCs reset() clears priority, callTimeout, tableName, and regionInfo which were set by the superclass before call() was entered. Since setCellScanner is called at the top of each loop iteration with the new batch's scanner, no cleanup is needed between iterations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Revert batch-splitting changes, keep only cell. attribute filtering Scoping down to just the extended attribute filtering. The batch-splitting for oversized RPCs will be addressed separately. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: skhillon <skhillon@hubspot.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
…n 2.7) Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
…ulkloaded HFiles (not yet upstream)
…kup HFiles (not yet upstream)
…emental backup bulkload copy (not yet upstream) Co-authored-by: Hernan Gelaf-Romer <hgelafromer@hubspot.com>
…mpt to merge primary and secondary replicas (will be in 2.6.6) * HubSpot Backport: HBASE-30299 Filter secondary replicas from region normalization planning The SimpleRegionNormalizer.NormalizeContext was including secondary replica regions in the list of table regions used for merge/split planning. Add a filter to remove non-default replicas so only primary regions are considered for normalization. Cherry-picked from apache/hbase cd4fce2 * Add table name retrieval in test for secondary replica handling in region planning --------- Co-authored-by: sahmadsabri <sahmadsabri@hubspot.com>
…ger can lead to data loss (not yet upstream)
…yet merged upstream)
…n allow premature WAL deletion when backup roots have different host coverage (#259)
…s (will be in 2.6.8) Co-authored-by: mazhengxuan <mazhengxuan@didiglobal.com> Signed-off by: Peng Lu <lupeng@apache.org> Signed-off by: Charles Connell <cconnell@apache.org>
…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>
charlesconnell
force-pushed
the
hubspot-2.6
branch
from
August 28, 2026 17:17
1848eb7 to
48b8692
Compare
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