hongzhi-gao opened a new pull request, #19161: URL: https://github.com/apache/iotdb/pull/19161
## Problem When every directory managed by a `FolderManager` is full during DataNode startup or configuration reload, construction fails. `TierManager` previously skipped that manager in its tier lists. Freeing disk space could then restore the DataNode to `Running`, but a later TsFile allocation could still fail with `IndexOutOfBoundsException` or select the wrong tier because the list no longer matched the configured tier levels. A successful configuration reload could also clear `ReadOnly(DiskFull)` even when the same directories remained full or another disk-full source had not recovered. ## Changes - Keep an entry for each configured tier and directory type before constructing its `FolderManager`. Retry a failed construction on the next access and reuse successfully constructed managers. - Register recovery checks against the current tier configuration. A directory reload or a new disk-full event invalidates recovery results obtained before that change. - Remove the unconditional transition to `Running` after a successful reload. Heartbeat recovery now requires both the aggregate disk-space check and every registered disk-full recovery check to pass. ## Verification - Focused DataNode and node-commons unit/component tests passed, including initialization while full, retry after recovery, reload with unchanged/full directories, an unrelated disk-full source, and concurrent recovery checks. - `python3 .github/scripts/check-it-selection.py` passed. - `mvn spotless:apply -o -pl integration-test -P with-integration-tests -Ddevelocity.off=true` passed. - `mvn verify -o -DskipUTs '-Dit.test=IoTDBDiskFullFolderRecoveryIT' -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl integration-test -am -P with-integration-tests -Ddevelocity.off=true` passed: 1 test, 0 failures, 0 errors, 0 skipped. The IT verifies `ReadOnly(DiskFull)` during a full-directory reload, continued read-only status after an unchanged reload, recovery to `Running`, and successful TsFile creation and query. The IT raises the disk-space warning threshold to exercise the real DataNode allocation and recovery paths without physically filling the host filesystem. -- 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]
