branch-4.1: [fix](streamingjob) fix streaming insert job not refreshing TVF props after ALTER SQL #61451#61489
Merged
yiguolei merged 1 commit intobranch-4.1from Mar 19, 2026
Merged
Conversation
… after ALTER SQL (#61451) ### What problem does this PR solve? When `ALTER JOB` is used to update the SQL of a streaming insert job (e.g. to rotate S3 access keys), `originTvfProps` was not updated along with the new SQL. As a result, both `fetchMeta()` and `createStreamingInsertTask()` continued to use the stale cached props from the original SQL, so the new credentials never took effect and the job kept failing with auth errors. #### Root Cause `originTvfProps` is lazily initialized from the parsed TVF node and cached for reuse. `alterJob()` called `setExecuteSql()` + `initLogicalPlan(true)` to rebuild `baseCommand` from the new SQL, but never refreshed `originTvfProps`. Both consumers of `originTvfProps` check `if (originTvfProps == null)` before re-deriving it, so the stale value was never evicted. ####Test Added test_streaming_insert_job_alter_aksk: 1. Create job with valid aksk, wait for at least one successful task. 2. Manually pause the job (with try-catch in case it is already paused). 3. ALTER job SQL to use wrong aksk. 4. Resume the job and assert it pauses again with "Failed to fetch meta". Without the fix, step 4 would never reach PAUSED because fetchMeta would still pick up the original valid aksk from the stale cache.
Contributor
|
run buildall |
Member
|
run p0 |
yiguolei
approved these changes
Mar 19, 2026
Contributor
Author
|
PR approved by at least one committer and no changes requested. |
Contributor
Author
|
PR approved by anyone and no changes requested. |
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 #61451