fix cdc watermark add failure handling#25925
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
The INSERT error now returns before cache mutation or success notification; deferred cleanup propagates the original error and clears affected jobs. The regression test covers both error propagation and cache integrity. Existing PR discussions contained no substantive prior findings. CI is green; local tests were blocked by missing prebuilt CGo dependencies.
|
Queued — the merge queue status continues in this comment ↓. |
☑️ Command
|
Merge Queue Status
This pull request spent 9 minutes 49 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 1 hour 30 minutes 39 seconds in the queue, including 57 minutes 54 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #25921
What this PR does / why we need it:
Updated pkg/cdc/watermark_updater.go: execAddWM now returns immediately when the
catalog INSERT fails, so it no longer writes the watermark into cacheCommitted. The
existing onJobs cleanup path then propagates the error to the waiting job.
TestAuditAddWatermarkFailureIsReturnedAndNotCached, covering the case where SELECT
returns no watermark row, INSERT fails with an injected error, the job receives that
error, and the failed watermark is not cached.