Caideyipi opened a new pull request, #18484: URL: https://github.com/apache/iotdb/pull/18484
## Description ### Avoid duplicate node status transitions `CommonConfig#setNodeStatus` now returns immediately when the requested status is already active. This preserves the existing status reason and prevents repeated `ReadOnly -> ReadOnly` transition logs from causing a log storm. ### Recover only after every monitored disk is healthy The DataNode heartbeat still reports aggregate disk metrics, but it now restores a disk-full node to `Running` only when every monitored `FileStore` has free space above the warning threshold. Empty, unreadable, or zero-sized file-store sets fail closed. Pipe receiver file directories are included in the monitored disk set in both DataNode metric initialization paths. ### Tests - `CommonConfigTest`: verifies that a repeated `ReadOnly` update preserves `DISK_FULL`. - `SystemMetricsTest`: verifies per-file-store threshold evaluation with one disk at 4% free and another disk healthy. - `DataNodeInternalRPCServiceImplDiskTest`: verifies that a 52% aggregate free ratio does not restore `Running` while the Pipe receiver disk remains below 5%, and that recovery occurs after all disks become healthy. Executed: ```text mvn -o -pl iotdb-core/metrics/interface -am -Dtest=SystemMetricsTest -Dsurefire.failIfNoSpecifiedTests=false test mvn -o -pl iotdb-core/node-commons -am -Dtest=CommonConfigTest -Dsurefire.failIfNoSpecifiedTests=false test mvn -o -pl iotdb-core/datanode -am -Dtest=DataNodeInternalRPCServiceImplDiskTest -Dsurefire.failIfNoSpecifiedTests=false test mvn -o -pl iotdb-core/datanode -DskipTests validate ``` <hr> This PR has: - [x] been self-reviewed. - [x] added unit tests to cover the new code paths. <hr> ##### Key changed/added classes (or packages if there are too many classes) in this PR - `CommonConfig` - `SystemMetrics` - `DataNodeInternalRPCServiceImpl` - `IoTDBConfig` - `DataNodeMetricsHelper` -- 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]
