Caideyipi opened a new pull request, #19129: URL: https://github.com/apache/iotdb/pull/19129
## Description Frequent subscription WAL replay refreshes repeatedly enumerate, sort, and stat retained WAL files. Cache the file table and parsed version IDs, invalidating it when the directory timestamp, live WAL version, or known corrupt-file set changes. A one-second fallback rescan covers unchanged directory timestamps. Preserve the cached file table, replay cursor, and retry state when directory enumeration fails. Wait for a successor WAL's version to be published before consuming it, so a header created during rotation cannot be mistaken for an exhausted sealed file. Add deterministic regression coverage for cache invalidation, timestamp fallback, enumeration failures, cursor preservation, corrupt-file decisions, and the rotation publication window. ## Validation - Local clean reactor build of the 28 required modules passed with `ProgressWALIteratorTest`: 40 tests, 0 failures, 0 errors, and 1 existing opt-in performance test skipped. All added tests ran locally. - Spotless, Checkstyle, and `git diff --check` passed. - The reviewed source snapshot is unchanged. The Chinese locale build, end-to-end subscription tests, and performance benchmark were not run. ```sh mvn -nsu clean test -P with-integration-tests -pl iotdb-core/datanode -am -T 1 -Dtest=ProgressWALIteratorTest -Dsurefire.failIfNoSpecifiedTests=false -Ddevelocity.off=true -Dstyle.color=never ``` This PR has: - [x] been self-reviewed. - [x] added comments explaining non-obvious behavior. - [x] added unit tests and updated existing coverage. Key changed classes: `ProgressWALIterator`, `ProgressWALIteratorTest`. -- 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]
