Skip to content

branch-4.1: [fix](fe) Keep CDC end offset consistent with current progress #65688#65816

Open
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-65688-branch-4.1
Open

branch-4.1: [fix](fe) Keep CDC end offset consistent with current progress #65688#65816
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-65688-branch-4.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #65688

### What problem does this PR solve?

Streaming CDC jobs periodically fetch the source end offset, while a
successful task commits its current offset independently. A task can
advance beyond the previously fetched end offset. The FE previously
converted the offset comparison into a boolean, so it could stop
scheduling but could not distinguish equality from the current offset
being ahead, leaving CurrentOffset greater than EndOffset in job output.

This change preserves the three-way comparison result and advances
EndOffset to CurrentOffset when the fetched end is behind. End-offset
publication is synchronized so an obsolete comparison result cannot
overwrite a newer fetched end. The PostgreSQL latest-offset credential
regression case now waits for the first task to commit the resolved
latest offset before inserting new rows.
@github-actions
github-actions Bot requested a review from yiguolei as a code owner July 20, 2026 08:24
@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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@JNSimba

JNSimba commented Jul 20, 2026

Copy link
Copy Markdown
Member

run p0

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 78.38% (29/37) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 83.78% (31/37) 🎉
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