li3zhi4 commented on PR #11677: URL: https://github.com/apache/seatunnel/pull/11677#issuecomment-5235955189
Following up on the local e2e run and SEZ9's stability concern — I reproduced, diagnosed, and fixed a real flakiness source in the e2e test itself, then re-ran it successfully. **Root cause found (not the production fix):** the e2e's failure injection used a MySQL `BEFORE INSERT` trigger on the sink table. After the injected sink failure, the job restarts from the last checkpoint and replays the binlog events written after it (including the `f_bigint=20000` update). On dev, the restored job's replay reached the sink while the trigger was still present, so the replayed insert failed **again** — with `job.retry.times = 1` already consumed by the first failure, the job went to `FAILED` and the test's final consistency assertion never got a chance to pass. Diagnostics confirmed: `SELECT COUNT(*) FROM information_schema.triggers` after `DROP TRIGGER` = 0, and the job status stays `RUNNING` throughout the restore window on dev (it does not briefly leave RUNNING), so the job-state signal could not be used to time the trigger removal. **Fix in the e2e (squashed into the single commit `7fd089a71`):** - After the `UPDATE f_bigint=20000` failure injection, wait a short fixed window (3s — covers CDC consumption of the update and the failed sink write, well below the 15s `job.retry.interval.seconds` restore delay), then `DROP TRIGGER` in the `finally` block so the post-restart binlog replay does not hit the trigger a second time. - Verify the trigger is actually gone via `information_schema.triggers` (count = 0) before waiting for the job to return to `RUNNING`, and only then inject `f_bigint=30000`. **Result:** `MysqlCDCIT#testMysqlCdcContinuesAfterSinkFailure` now passes locally (1/1, ~63s, `BUILD SUCCESS`) on the current head `7fd089a71`, with the full path: snapshot → checkpoint → injected sink failure → Zeta restore → CDC continues → consistency re-asserted. spotless passes on the affected module. This is a test-side fix; the production change (`IncrementalSourceEnumerator.addSplitsBack()`) is unchanged and still covered deterministically by the unit test. The fresh CI run on `7fd089a71` will exercise the updated e2e. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
