Caideyipi commented on PR #19241: URL: https://github.com/apache/iotdb/pull/19241#issuecomment-6817551203
### Implemented-draft re-review Reviewed `a7d199b65162c9d62bad1c4e64883e33472fc58f` against the full target diff and relevant context, excluding the documented TODOs. This round found two actionable issues: 1. **[P1] Snapshots omitted legacy terminal decisions when migration could not publish.** Recovery deliberately preserves legacy COMMIT/ABORT progress in staging after a failed `.finished` migration, but those tasks are outside the active manager map. The [original history capture](https://github.com/apache/iotdb/blob/a7d199b65162c9d62bad1c4e64883e33472fc58f/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileSnapshot.java#L102) only included published history, allowing a successful snapshot to lose the only terminal identity. Fixed by capturing unmanaged legacy terminal progress under its task ID, including when no lazy manager exists. Added snapshot/restore coverage for both outcomes, failed publication, absent/present manager, and mismatched legacy progress filenames. 2. **[P2] The permanent COMMIT exception test did not inject a COMMIT exception.** The [original test](https://github.com/apache/iotdb/blob/a7d199b65162c9d62bad1c4e64883e33472fc58f/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachineTest.java#L53) stubbed only PREPARE; COMMIT returned Mockito's default `false`, leaving its exception-classification path untested. Fixed by injecting the same permanent COMMIT exception and checking its returned message. Both fixes are in `aa6b6acd01da446363f2e337c0163aaeeec0f4d6`. Final local HEAD, confirmed source-branch HEAD, and confirmed PR HEAD all match that revision. The PR remains draft: the existing TODOs are unchanged, and this round's behavioral/test findings require a fresh independent re-review after the update. Validation at the final revision: - Clean 28-module local Maven reactor with JDK 17, Maven 3.8.8, the integration-test profile, and build cache disabled: **81 tests passed; 0 failures, 0 errors, 0 skips**. This covers the four focused LOAD/state-machine suites plus the selected DataRegion lifecycle and IoTDB snapshot cases. All 15 newly added test methods in the full PR diff ran locally at this revision. - Spotless apply, the reactor's Checkstyle/forbidden-API checks, and `git diff --check` passed. - The remote attempt was stopped before compilation because public dependency-repository connections timed out; its result is unverified. The passing result above is from the local fallback. - No current-revision ClusterIT, Chinese-locale build, process-kill crash test, or performance benchmark was run. Full CI results for this revision have not been evaluated. These checks do not establish the unfinished TODO recovery guarantees. The linked [lifecycle IT failure in #19051](https://github.com/apache/iotdb/actions/runs/43137213852/job/130915313476?pr=19051) does not exercise this retry path: it uses SimpleConsensus and fails before the intentional crash. Its global `transferFile` breakpoint also suspends the canary's local loader while holding the DataRegion write lock. The log shows read-lock retries for a minute, followed by immediate successful loading when debugger cleanup releases it. The conditional test transfer was therefore not applied; #19051 is unchanged. -- 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]
