Skip to content

[fix](streaming-job) sync sourceProperties and targetProperties in replayOnUpdated#62553

Open
JNSimba wants to merge 2 commits intoapache:masterfrom
JNSimba:fix/source_target_props_restart
Open

[fix](streaming-job) sync sourceProperties and targetProperties in replayOnUpdated#62553
JNSimba wants to merge 2 commits intoapache:masterfrom
JNSimba:fix/source_target_props_restart

Conversation

@JNSimba
Copy link
Copy Markdown
Member

@JNSimba JNSimba commented Apr 16, 2026

What problem does this PR solve?

Problem Summary:

After ALTER JOB changes a streaming job's source/target properties,
StreamingInsertJob.replayOnUpdated() did not propagate sourceProperties
and targetProperties from the replay job to the in-memory job.

The checkpoint thread replays journals on its own Env, so the generated
image also lost the ALTERed values — any subsequent FE restart (from image
or EditLog) would revert to the original CREATE-time properties. For CDC
jobs this can cause follower failover to use stale JDBC credentials or
miss updated load options such as max_filter_ratio.

Fix: sync both maps in replayOnUpdated() with null-guards, matching the
pattern used for offsetProviderPersist (#62449).

Release note

Fix streaming job ALTER JOB source/target properties being lost after FE checkpoint/restart.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

JNSimba and others added 2 commits April 16, 2026 14:49
…sistence after FE restart

Regression test to verify that sourceProperties and targetProperties
altered via ALTER JOB survive FE restart. Expected to fail until
StreamingInsertJob.replayOnUpdated() is fixed to sync both property maps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…playOnUpdated

After ALTER JOB changes source/target properties, replayOnUpdated()
did not propagate sprops/tprops into the replaying job. The checkpoint
thread replays journals on its own Env, so the generated image also
lost the ALTERed values — any subsequent FE restart (from image or
EditLog) would revert to the original CREATE-time properties.

For CDC jobs this can cause follower failover to use stale JDBC
credentials or miss updated load options such as max_filter_ratio.

Also tighten the regression test's ALTER JOB to only specify the
changed properties.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hello-stephen
Copy link
Copy Markdown
Contributor

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?

@JNSimba
Copy link
Copy Markdown
Member Author

JNSimba commented Apr 16, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/4) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/664) 🎉
Increment coverage report
Complete coverage report

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.

2 participants