Caideyipi opened a new pull request, #18923: URL: https://github.com/apache/iotdb/pull/18923
## Description When compaction removes an original TsFile and its mods after historical selection, a pipe can lose deletion filtering or fail to acquire the event's file references. Backport the historical TsFile/mod preservation fix from #18904 (10c5f89ba52ec39cd6bfb6b8b735287cc0d935f9) to `dev/1.3`. - Resolve historical event files and mods from the pinned pipe directory instead of checking the removed originals. - Remember whether historical selection actually acquired a mod-file reference, so unpin releases exactly that reference and preserves mods acquired later by an event. - Use the same pipe-name/creation-time directory during historical selection and event creation. This is required on `dev/1.3` for the event to find the pinned files after compaction. ### Backport scope and adaptation - Adapted the fix to `PipeHistoricalDataRegionTsFileSource` and the legacy `ModificationFile` / `.mods` API. - Added regression coverage for historical source-to-event ownership, original-file removal with and without mods, disabled mod transfer, and mods created after pinning. - Subscription changes are excluded. The original PR's authentication-injection fix and empty-DataRegion auto-drop test change do not apply to the `dev/1.3` implementation. ### Validation - `mvn -nsu spotless:apply -pl iotdb-core/datanode` passed. - `mvn -nsu test -pl iotdb-core/datanode -am -Dtest=PipeTsFileInsertionEventTest,PipeTsFileResourceManagerTest,PipeHistoricalDataRegionTsFileSourceTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dcheckstyle.skip=true` passed, including the dependency reactor build. - 25 tests passed; 0 failures, 0 errors, 0 skipped. - `git diff --check` passed. <hr> This PR has: - [x] been self-reviewed. - [x] added comments explaining non-obvious ownership and compaction behavior. - [x] added unit tests covering the affected code paths. <hr> ##### Key changed classes - `PipeTsFileInsertionEvent` - `PipeTsFileResourceManager` - `PipeHistoricalDataRegionTsFileSource` - Their corresponding unit tests. -- 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]
