[improvement](be) Apply trash sweep policy to shutdown tablets - #66395
Draft
wenzhenghu wants to merge 2 commits into
Draft
[improvement](be) Apply trash sweep policy to shutdown tablets#66395wenzhenghu wants to merge 2 commits into
wenzhenghu wants to merge 2 commits into
Conversation
### What problem does this PR solve? Issue Number: None Related PR: HYDCP#75 Problem Summary: Shutdown tablets were moved into trash even when the current sweep was deleting trash immediately for manual cleanup, disabled retention, or high disk usage. This delayed disk-space reclamation and could recreate trash entries during an urgent cleanup. Build one immutable policy per DataDir and use it for both trash expiration and shutdown-tablet path resolution. Eligible shutdown tablet paths are deleted directly during immediate cleanup conditions and continue to move to trash during normal retention sweeps. Shutdown tablets on unused DataDirs remain deferred, and existing transition, UID, path, metadata, reference-count, and failure-requeue safeguards are preserved. ### Release note Shutdown tablet paths now follow the current per-DataDir trash sweep policy. During immediate cleanup conditions they are deleted directly instead of being moved into trash again. ### Check List (For Author) - Test: Unit Test coverage added but not executed per requested validation scope - Static checks: clang-format 16, build-support/check-format.sh, and git diff --check passed - BE build: Not completed; interrupted during third-party dependency preparation before source compilation - Behavior changed: Yes. Shutdown tablet paths may be deleted directly during immediate trash cleanup conditions. - Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
wenzhenghu
marked this pull request as draft
August 3, 2026 14:05
### What problem does this PR solve? Issue Number: None Related PR: HYDCP#75 Problem Summary: Clarify that shutdown tablets on a DataDir which failed its health check are deferred until the operator restores the path, clears its broken state, and restarts the BE. Remove an unused trash-expiration assignment and document the idempotent parent-directory check used by GC retries. ### Release note None ### Check List (For Author) - Test: No need to test (static-only review follow-up; formatting and diff checks passed) - Behavior changed: No - Does this need documentation: No
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.
Proposed changes
Issue Number: None
Related PR: HYDCP#75
Shutdown tablets are processed after the DataDir trash sweep. Previously, even when a manual cleanup or high disk usage made the current sweep delete trash immediately, newly resolved shutdown tablet paths could still be moved back into trash according to the global retention configuration. This delayed disk-space reclamation and recreated trash entries during an urgent cleanup.
This PR:
No FE-BE protocol, persistent format, or new configuration is introduced.
Release note
Shutdown tablet paths now follow the current DataDir trash sweep policy. During immediate cleanup conditions they are deleted directly instead of being moved into trash again.
Check List
./build-support/clang-format.shand./build-support/check-format.shpassedgit diff --checkpassed