Caideyipi opened a new pull request, #19136:
URL: https://github.com/apache/iotdb/pull/19136

   ## Description
   
   Local whole-file LOAD exposes the destination TsFile before installing its 
resource and mods. A DataNode process crash in that window can let restart 
recover the file without its deletions and make deleted values visible again.
   
   Stage the data under `.tsfile.load-pending`, install the resource and mods, 
finish legacy mods conversion synchronously, and publish the TsFile with a 
same-directory atomic rename. Keep the source file group until publication, 
then honor `deleteOriginFile`. Clean unpublished groups on installation failure 
and restart, and bind the resource's cached mods handle to the installed file.
   
   ## Regression coverage
   
   - Extend `DataRegionTest` to check source retention/deletion with and 
without mods, failure when the resource sidecar is missing, immediate staging 
cleanup, and the installed mods handle and contents.
   - Add `IoTDBLoadTsFileInstallIT`, using real SQL and a shared 1C1D 
Simple-consensus fixture. JDWP/JDI pauses the actual local whole-file 
installation before mods, after mods but before publication, and after 
publication but before the client response. Each boundary covers both 
`on-success` policies and both mods formats: 3 methods, 12 crash combinations. 
Recovery is checked before any explicit new LOAD, with exact values, nulls, 
deletions, source/target file groups, and actual DataRegion readiness. JDWP is 
opt-in and bound to loopback in the test environment.
   
   ## Validation
   
   - Built the required IoTDB dependency reactor from clean source, then 
rebuilt the final DataNode and downstream node templates after the last edits.
   - The new unit method and the complete new IT class passed against the final 
artifacts: 1 unit method and 3 IT methods, with zero failures, errors, or 
skips. All newly added tests were executed locally.
   - 19 existing related LOAD utility/manager unit methods also passed earlier 
in this task.
   - Spotless, the final staged diff whitespace check, and IT selection 
validation passed (830 classes, 3 shards).
   
   Executed locally on Windows with JDK 17.0.15 and Maven 3.8.8, using the 
ClusterIT profile with the explicit 1C1D fixture. Verification used 
`-Drat.skip=true -Denforcer.skip=true` and TsFile version 
`2.5.1-261023-20261023.065606-1`. TsFile dependencies used published binaries 
and were not rebuilt or fully source-traced. The full suite and zh-locale 
reactor were not run; remote CI results are not included. This validates 
process-crash recovery; machine power-loss durability was not tested.
   
   Independent self-review is pending. This PR is intentionally Draft.


-- 
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]

Reply via email to