Add DataNodeExceptionMetrics with suspected disk exception counter - #18554
Merged
Conversation
…r DataNode Add a new DataNodeExceptionMetrics class with a counter that tracks suspicious disk exceptions. The counter only increments when an exception in the cause chain is exactly java.nio.file.FileSystemException (not subclasses), because subclasses like NoSuchFileException or NotDirectoryException typically indicate logical file-state errors rather than real disk failures. Integration points cover: - Write path: TsFileProcessor, MemTableFlushTask, WALBuffer, CheckpointManager - Compaction: AbstractCompactionTask, CompactionScheduler - WAL recovery: WALNodeRecoverTask, Unsealed/SealedTsFileRecoverPerformer - Schema engine: SchemaRegionPBTreeImpl (writeToMLog), SchemaRegionMemoryImpl, MemMTreeSnapshotUtil, PBTreeFlushExecutor, SchemaFile - Load: LoadTsFileManager, FileLoaderUtils - Disk management: TierManager
JackieTien97
approved these changes
Aug 31, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #18554 +/- ##
============================================
+ Coverage 42.24% 42.34% +0.09%
Complexity 413 413
============================================
Files 5409 5411 +2
Lines 389958 390231 +273
Branches 50978 51071 +93
============================================
+ Hits 164742 165233 +491
+ Misses 225216 224998 -218 ☔ 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.
Description
Add a unified DataNode disk exception monitoring metric using a Counter that tracks suspicious disk exceptions across the DataNode write path.
Design
DataNodeExceptionMetricsclass with a Counter namedsuspected_disk_exception_countgetClass() ==) instead ofinstanceofforjava.nio.file.FileSystemExceptionbecause subclasses (e.g.NoSuchFileException,NotDirectoryException) typically indicate logical file-state errors rather than real disk failuresIntegration points
Write path:
TsFileProcessor(flush, fsync, close, mod file write, truncate)MemTableFlushTask(writePlanIndices, writeToFileWriter)WALBuffer(roll, force/fsync, close, read)CheckpointManager(write, fsync, roll, close)DataRegion(recovery)Compaction:
AbstractCompactionTask,CompactionSchedulerWAL recovery:
WALNodeRecoverTask,UnsealedTsFileRecoverPerformer,SealedTsFileRecoverPerformerSchema engine:
SchemaRegionPBTreeImpl(writeToMLog — single point covering all mlog writes)SchemaRegionMemoryImpl,MemMTreeSnapshotUtil,PBTreeFlushExecutor,SchemaFileLoad:
LoadTsFileManager,FileLoaderUtilsDisk management:
TierManager