branch-4.0: [fix](job) fix streaming job stuck when S3 auth error is silently ignored in fetchRemoteMeta #61284#61296
Merged
yiguolei merged 1 commit intobranch-4.0from Mar 13, 2026
Conversation
…ored in fetchRemoteMeta (#61284) ### What problem does this PR solve? #### Problem When S3 credentials become invalid (e.g. 403 auth error), the streaming job neither pauses nor reports an error — it hang, even add new files. indefinitely without making progress. #### Root cause: S3ObjStorage.globListInternal() catches all exceptions and returns a GlobListResult with a non-ok Status instead of rethrowing. S3SourceOffsetProvider.fetchRemoteMeta() called globListWithLimit() but never checked the returned status. Since objects was empty, the maxEndFile was never updated, hasMoreDataToConsume() kept returning false, and the scheduler retried every 500ms forever without triggering a PAUSE. The same status check was also missing in getNextOffset(), which would produce a misleading "No new files found" error instead of the actual S3 error message. #### Fix - In fetchRemoteMeta(): check globListResult status after globListWithLimit(); throw Exception with the real error message if not ok, so the upper-level StreamingInsertJob.fetchMeta() catch block can catch it, set GET_REMOTE_DATA_ERROR, and PAUSE the job for auto-resume. - In getNextOffset(): same status check, throw RuntimeException with accurate error message. - Add a debug point S3SourceOffsetProvider.fetchRemoteMeta.error to simulate a failed GlobListResult for testing. #### Test Added regression test test_streaming_insert_job_fetch_meta_error: enables the debug point to inject a failed GlobListResult, creates a streaming job, waits for it to reach PAUSED status, and asserts the ErrorMsg contains "Failed to list S3 files".
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
yiguolei
approved these changes
Mar 13, 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.
Cherry-picked from #61284