davidzollo opened a new pull request, #11382: URL: https://github.com/apache/seatunnel/pull/11382
### Purpose Fixes #11381. This PR enforces the existing schema-change checkpoint protocol on the sink side so sink writers cannot apply a `SchemaChangeEvent` before the schema-change-before checkpoint has completed. This prevents downstream DDL from racing ahead of old-schema rows that still need to cross the sink checkpoint / flush boundary. ### Changes - Add `SchemaChangeDrainGuard` in the sink flow to reject schema changes until a completed schema-change-before checkpoint opens the DDL window. - Close the DDL window after the schema-change-after checkpoint completes or when a schema-change checkpoint is aborted. - Pass `CheckpointType` through checkpoint completion notifications so the guard also works correctly after failover, when the restored sink may not have observed the original barrier in the new runtime. - Add unit coverage for normal ordering, unsafe bypass, checkpoint-abort cleanup, and restore-from-schema-change-checkpoint behavior. ### Tests - `./mvnw spotless:apply -pl seatunnel-engine/seatunnel-engine-core,seatunnel-engine/seatunnel-engine-server -nsu -Dmaven.gitcommitid.skip=true` - `./mvnw test -pl seatunnel-engine/seatunnel-engine-server -Dtest=SchemaChangeDrainGuardTest -nsu -Dmaven.gitcommitid.skip=true` - `./mvnw verify -pl seatunnel-engine/seatunnel-engine-core,seatunnel-engine/seatunnel-engine-server -DskipTests -DskipIT -nsu -Dmaven.gitcommitid.skip=true` -- 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]
