smengcl opened a new pull request, #9788: URL: https://github.com/apache/ozone/pull/9788
Generated-by: GitHub Copilot with Claude Opus 4.6 (with manual tweaks) ## What changes were proposed in this pull request? Add defragmentation metrics to `SnapshotDefragService` and trace-level dir stats logging. Metrics added: ### Counters (`OmSnapshotInternalMetrics`) | Metric | Description | |--------|-------------| | `numSnapshotDefrag` | Total successful defrag ops (full + incremental) | | `numSnapshotDefragFails` | Total failed defrag attempts | | `numSnapshotDefragSnapshotSkipped` | Snapshots skipped (non-active or already defragmented) | | `numSnapshotFullDefrag` | Successful full defrag ops | | `numSnapshotFullDefragFails` | Failed full defrag ops | | `numSnapshotFullDefragTablesCompacted` | Tables compacted during full defrag | | `numSnapshotIncDefrag` | Successful incremental defrag ops | | `numSnapshotIncDefragFails` | Failed incremental defrag ops | | `numSnapshotIncDefragDeltaFilesProcessed` | Delta SST files processed during incremental defrag | ### Latency gauges (`OMPerformanceMetrics`) | Metric | Description | |--------|-------------| | `snapshotDefragServiceFullLatencyMs` | Last full defrag latency (ms) | | `snapshotDefragServiceIncLatencyMs` | Last incremental defrag latency (ms) | When TRACE is enabled, logs checkpoint directory stats (total files, SST file count, disk usage) before and after each defrag run. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-13453 ## How was this patch tested? - Added test cases; inserted metrics in existing tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
