Delete empty TsFile sidecars after LOAD - #18599
Open
luoluoyuyu wants to merge 1 commit into
Open
Conversation
When LOAD skips an empty TsFile with on-success=delete, also remove its resource and mods files, and add an integration test covering the deletion.
Caideyipi
approved these changes
Sep 8, 2026
Caideyipi
left a comment
Collaborator
There was a problem hiding this comment.
已审阅,未发现阻塞问题。
实现与现有 LoadSingleTsFileNode.clean() 的清理语义一致:分别重试删除 TsFile、.resource、.mods2 和 .mods,并且单个文件删除失败不会阻止后续 sidecar 的清理。新增集成测试覆盖了空 TsFile 使用 on-success=delete 时四类文件均被删除的行为。
本地验证:
spotless:check(DataNode 和 integration-test)通过;IoTDBLoadTsFileIT#testDeleteEmptyTsFileAfterLoad通过(1 test,0 failures,0 errors);- 完整依赖 reactor 构建成功。
当前唯一失败的 CI 是未涉及本 PR 变更路径的 IoTDBPipeAutoDropIT.testAutoDropIgnoredUnmatchedDataRegions 数据一致性波动;其余已完成检查均通过,包括 Windows、unit tests 和 zh-locale-compile。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When LOAD skips an empty TsFile with on-success=delete, also remove its resource and mods files, and add an integration test covering the deletion.
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR