[BugFix] Include underlying cause in HdfsFsManager copy error messages (backport #73414)#73477
Merged
Merged
Conversation
19 tasks
xiangguangyxg
approved these changes
May 19, 2026
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.
Why I'm doing:
HdfsFsManager.copyFromLocal/copyToLocalwrap the underlying Hadoop exception in aStarRocksExceptionbut only put the source / destination paths into the new message, dropping the cause's message.Callers that surface only
StarRocksException#getMessageto the user can lose all useful diagnostic information. The motivating case is automated cluster snapshot upload to remote object storage:When the underlying S3/OSS upload fails (AccessDenied, NoSuchBucket, SocketTimeoutException, SignatureDoesNotMatch, FileAlreadyExistsException, etc.), the user only sees the following in
information_schema.cluster_snapshot_jobs.error_message:…with no hint of the real reason. Operators currently have to grep
fe.logfor theException while copy local …stack trace to find what actually went wrong.What I'm doing:
e.getMessage()to theStarRocksExceptionwrapper message in bothcopyFromLocalandcopyToLocal(for bothInterruptedIOExceptionand the genericExceptionpaths), so the real cause is visible at the call site without losing the existing wrapper for log greppability.to localincopyToLocal's error string (previously producedFailed to copy /pathto local /dest).testCopyToLocalIncludesCauseMessageandtestCopyFromLocalIncludesCauseMessagecovering both methods.The underlying cause is already attached to the
StarRocksExceptionand still gets logged with full stack trace viaLOG.error— this change only adds the cause's message to the user-visible message string.Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
Checklist:
Bugfix cherry-pick branch check:
This is an automatic backport of pull request [BugFix] Include underlying cause in HdfsFsManager copy error messages #73414 done by Mergify.