You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nzw921rx (via GitHub)" <gi...@apache.org> on 2026/09/14 04:37:48 UTC
[PR] [Fix][Flink] Process same-timestamp schema restore events [seatunnel]
nzw921rx opened a new pull request, #12306:
URL: https://github.com/apache/seatunnel/pull/12306
### Purpose of this pull request
Follow up on the remaining Flink issue identified in #11503.
SchemaOperator uses one global lastProcessedEventTime and treats events whose millisecond timestamp is less than or equal to it as outdated. Multi-table CDC recovery can create several RestoreTableSchemaEvents in the same millisecond, causing every event after the first to be silently skipped and leaving those tables with stale sink-side runtime schemas.
This patch exempts RestoreTableSchemaEvent from the normal timestamp deduplication because restore events are idempotent runtime-schema refreshes and never execute physical DDL. The existing outdated-event behavior remains unchanged for normal schema change events.
A regression test forces restore events for two different tables to share the same timestamp and verifies that both are broadcast and acknowledged by the schema coordinator.
### Does this PR introduce _any_ user-facing change?
Yes. Flink multi-table CDC jobs now restore the runtime schema for every changed table after failover even when multiple restore events have the same millisecond timestamp.
### How was this patch tested?
- ./mvnw spotless:apply
- ./mvnw -pl seatunnel-translation/seatunnel-translation-flink/seatunnel-translation-flink-common -DskipITs -Dskip.spotless=true -Dcheckstyle.skip -Dtest=SchemaOperatorTest test
- Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
- git diff --check
Maven verify was not run locally.
### Check list
* [x] No new Jar binary package is added.
* [x] Documentation is not required for this targeted correctness fix.
* [x] This change is backward compatible and does not require an incompatible-change entry.
* [x] This is not connector code.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Flink] Process same-timestamp schema restore events [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12306:
URL: https://github.com/apache/seatunnel/pull/12306#issuecomment-5728656469
Thanks @dybyte for taking a look and +1'ing this!
Agreed on the conclusion — I traced the root cause independently in my review above (the same-millisecond `RestoreTableSchemaEvent` collision hitting `SchemaOperator#applyNextPendingSchemaChange`'s staleness dedup) and confirmed the fix is scoped correctly and doesn't touch the real-DDL staleness guard.
On the "if CI passes" condition specifically: I re-checked the actual CI run for the current head (`0695aa3f5995`, the "Merge branch 'dev' into ..." commit). The apache-side "Build" check is just a pointer — the real run lives on the fork: `nzw921rx/seatunnel` run `34967398751`. It currently shows **3 failing jobs**: `all-connectors-it-2 (8, ubuntu-latest)` and `all-connectors-it-2 (11, ubuntu-latest)` (both failing at the "run connector-v2 integration test (part-2)" step), plus `engine-v2-it (8, ubuntu-latest)`. 80 other jobs passed and 11 were skipped as expected given this PR's footprint.
This PR only touches `seatunnel-translation-flink-common` (`SchemaOperator.java` plus its unit test) — none of the connector-v2 modules exercised by the `all-connectors-it-2` batch, nor the generic Zeta `engine-v2-it` suite, are part of this diff. So these read as pre-existing/environmental IT flakiness rather than a regression introduced here, consistent with the pattern of unrelated-IT-job failures I flagged against the prior run in my Sept 15 review — but that run predates this merge-into-dev commit, so I hadn't verified CI on this exact head until now.
Net: as of this moment, CI is **not** green for the current head, so the "+1 if CI passes" condition isn't fully satisfied yet. I'd suggest re-running those two job types to confirm they're flaky rather than a real regression before merging. Nothing on the code side blocks this from my end — my "Ready to merge" conclusion from the Sept 15 review stands once CI is confirmed clean (or confirmed pre-existing on `dev`).
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Flink] Process same-timestamp schema restore events [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #12306:
URL: https://github.com/apache/seatunnel/pull/12306
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org