Skip to content

fix: resolve account for SNAPSHOT data objects in DownloadListener (fixes #13900) - #13929

Open
waterWang wants to merge 1 commit into
apache:mainfrom
waterWang:fix-snapshot-account-lookup-13900
Open

fix: resolve account for SNAPSHOT data objects in DownloadListener (fixes #13900)#13929
waterWang wants to merge 1 commit into
apache:mainfrom
waterWang:fix-snapshot-account-lookup-13900

Conversation

@waterWang

Copy link
Copy Markdown

Fixes

Fixes #13900

Root cause

DownloadListener.getAccountIdForDataObject() only handles TEMPLATE and VOLUME data object types. For SNAPSHOT data objects it falls through and returns null, so checkAndUpdateResourceLimits() calls _accountMgr.getAccount(null) — the account lookup fails, resource-limit accounting is skipped, the download is never marked successful, and copySnapshot between zones times out after ~90s even though the destination SSVM already finished downloading the snapshot files.

Fix

Add a SNAPSHOT branch to getAccountIdForDataObject() that looks up the snapshot's account via SnapshotDao.findById(), mirroring the existing TEMPLATE/VOLUME branches. The downloaded snapshot files are already present on the destination store; only the account attribution and resource-count update were missing.

Testing

  • mvn -pl server -am compile passes
  • No new dependencies — SnapshotDao is already used elsewhere in the server module

…ataObject

Fixes apache#13900: copySnapshot between zones fails with
"Timeout waiting for response from storage host" when the account
lookup returns null for SNAPSHOT data objects.

Signed-off-by: waterWang <waterwang@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copySnapshot between zones fails with: Timeout waiting for response from storage host

1 participant