Caideyipi commented on PR #19136: URL: https://github.com/apache/iotdb/pull/19136#issuecomment-6652664354
Initial independent self-review (one round). Reviewed `100718bdc589886bfda75205045952c51dfcf88e` against `e92ecf1d5d62de0c67a52e80ff6cb7e307ab6583`: the complete original six-file diff and the relevant installation, recovery, source-cleanup, debugger, and test context. Fixed in `e185fb836b69aa6917d79dbd92362bf72445a2fc`: - **P2: A committed LOAD could be reported as failed.** Source deletion errors in [DataRegion.java](https://github.com/apache/iotdb/blob/100718bdc589886bfda75205045952c51dfcf88e/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java#L4971) were propagated after atomic publication and registration. A caller retry could import the file again. Source cleanup now logs the failure and preserves the committed success result. - **P2: Retained source data must retain its deletion sidecars.** The existing [LoadSingleTsFileNode.clean](https://github.com/apache/iotdb/blob/e185fb836b69aa6917d79dbd92362bf72445a2fc/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadSingleTsFileNode.java#L248) continued deleting resource/mods after a source-data deletion failure. This adjacent cleanup path also needed a guard when committed installation failures became nonfatal; it now stops if source-data deletion fails. Added a local whole-file LOAD regression that pauses at TsFileManager.add exit, after publication/registration and before source cleanup. It covers data/resource deletion failures and both mods formats, requires the original request to still await its response before injection, then verifies SQL success, the expected source group, every value/null, and applied deletions. Validation: - Spotless passed with the integration-test profile. - Clean source build of the IT dependency closure passed; the source-policy unit method passed (1 method, 0 failures/errors/skips). After the adjacent cleanup guard, DataNode and downstream templates were rebuilt clean using the unchanged upstream artifacts from that same source build. - Exact Failsafe selection passed: the new IT method, four internal combinations, 0 failures/errors/skips. Node logs confirm all four injected cleanup failures; the template DataNode JAR matches the final built JAR by SHA256. - Git Bash IT selection/category checks passed for all three shards (830 classes); whitespace checks passed. - The earlier crash tests had already passed locally. This round reran only affected checks. An initial IT assertion incorrectly expected mods to remain after SQL's successful-batch cleanup; that assertion was corrected, and source-data failure coverage was added. - An initial resumed build encountered incompatible installed IoTDB artifacts and a missing Surefire empty-selection option; rebuilding the full required source closure with the correct filters resolved it. - Not run/verified: full suite, full zh reactor, remote CI, or machine power-loss durability. RAT and Enforcer were skipped; external TsFile snapshot binaries were not rebuilt from source. Deferred, unchanged as requested: [DataRegion.java:4867](https://github.com/apache/iotdb/blob/e185fb836b69aa6917d79dbd92362bf72445a2fc/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java#L4867) requests limiter tokens using the destination file length before creation, potentially charging zero bytes. This predates this PR. Final local HEAD = confirmed remote branch = confirmed PR head: `e185fb836b69aa6917d79dbd92362bf72445a2fc`. The worktree is clean and the PR remains Draft. A fresh independent re-review is required because this round found behavioral issues; no second review round was performed. -- 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]
