Skip to content

branch-4.0: [fix](backup) reject upload snapshots on broken storage path #61251#61435

Open
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-61251-branch-4.0
Open

branch-4.0: [fix](backup) reject upload snapshots on broken storage path #61251#61435
github-actions[bot] wants to merge 1 commit intobranch-4.0from
auto-pick-61251-branch-4.0

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #61251

Backup upload reuses snapshot paths returned by MAKE_SNAPSHOT. When a
data dir is later marked as broken, the stale snapshot directory can
still remain on that disk and be picked up by upload. In that case the
upload task may continue into file checksum and remote upload logic with
a snapshot source that is no longer safe to read.

This change adds a broken-storage-path validation step to SnapshotLoader
local source path checking for upload. The check canonicalizes the
snapshot path, matches it to its DataDir, and rejects the source early
when the owning DataDir is offline or the path is listed in
broken_storage_path. That turns the broken-disk case into a normal task
error instead of letting upload continue on an invalid local snapshot
source.

The unit tests cover both the direct broken-path case and a
canonicalized symlink path to ensure the validation cannot be bypassed
by path indirection.
@github-actions github-actions bot requested a review from yiguolei as a code owner March 17, 2026 12:07
@Thearas
Copy link
Contributor

Thearas commented Mar 17, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Mar 17, 2026
@Thearas
Copy link
Contributor

Thearas commented Mar 17, 2026

run buildall

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.

3 participants