zhangshenghang opened a new pull request, #11103: URL: https://github.com/apache/seatunnel/pull/11103
### Purpose of this pull request Fixes #10523. File sink writers can write rows while checkpoint commit logic closes the current output files. The concrete format writers guarded their own file maps independently from `prepareCommit()` / `snapshotState()`, so a checkpoint could close an output stream while a row was still being written, which matches the reported `stream was closed` failure. ### What changed - Synchronize file writer `write()` and `finishAndCloseFile()` methods across file formats. - Synchronize shared checkpoint/schema state transitions in `AbstractWriteStrategy`. - Add a regression test that keeps a text output stream blocked during write and verifies `finishAndCloseFile()` waits instead of closing it early. ### Does this PR introduce _any_ user-facing change? No. This only prevents a race between file writes and checkpoint file closing. ### How was this patch tested? - `./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-base -DskipIT -Dskip.spotless=true -Dtest=AbstractWriteStrategyTest#shouldNotCloseTextOutputStreamWhileWriteIsInProgress test` - `./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-base -DskipIT -Dskip.spotless=true test` - `./mvnw spotless:apply` - `./mvnw -q -DskipTests verify` -- 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]
