Skip to content

[To dev/1.3][Pipe] Optimize pipe TsFile cleanup on drop (#18163)#18303

Open
Caideyipi wants to merge 1 commit into
apache:dev/1.3from
Caideyipi:cp-18163-dev-1.3
Open

[To dev/1.3][Pipe] Optimize pipe TsFile cleanup on drop (#18163)#18303
Caideyipi wants to merge 1 commit into
apache:dev/1.3from
Caideyipi:cp-18163-dev-1.3

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Backport #18163 to dev/1.3, cherry-picked from commit 350c6c7.

This optimizes cleanup after a Pipe is dropped by avoiding per-file deletion during resource release, moving the whole stale Pipe TsFile directory aside, and submitting it to the throttled periodical cleaner.

Adaptations for dev/1.3:

  • Keep the dev/1.3 ModificationFile handling and literal logging style because the newer DataNode i18n layout is not present on this branch.
  • Include the minimal pipeName_creationTime resource-key handling that was already present on master before Optimize pipe TsFile cleanup on drop #18163. This is required so dropping a Pipe locates the same resource directory used by its TsFile events and safely distinguishes recreated Pipes with the same name.

Tests:

  • mvn -o -nsu -Ddevelocity.off=true -pl iotdb-core/datanode -Dtest=PipeTsFileResourceManagerTest -DfailIfNoTests=false test
  • mvn -o -nsu -Ddevelocity.off=true -pl iotdb-core/datanode -Dtest=PipeTsFileInsertionEventTest -DfailIfNoTests=false test

Both commands passed, including DataNode compilation, Checkstyle, and Spotless checks.

* Optimize pipe TsFile cleanup on drop

* Use ThreadName for pipe TsFile cleanup executor

* Make pipe TsFile cleanup thread lazy

* Use IoTDB thread pool factory for pipe cleanup

* Clarify pipe TsFile cleanup deletion guard

* Reuse periodical cleaner for Pipe TsFile cleanup

* Clarify stale Pipe dir collection

* Revert "Clarify stale Pipe dir collection"

This reverts commit 25625fb.

* Avoid duplicate stale Pipe dir collection

(cherry picked from commit 350c6c7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants