corgy-w opened a new pull request, #11995:
URL: https://github.com/apache/seatunnel/pull/11995

   ### Purpose of this pull request
   
   `AssertSinkWriter.close()` sleeps 1000ms to wait for other sink writers to 
finish, assuming a multi-writer job. This heuristic both slows down every job 
completion (even single-table jobs pay 1s) and is unreliable under load.
   
   The writer already routes each row to the shared `LONG_ACCUMULATOR` keyed by 
table name in `write()` (its own table when `assertRowRules` contains multiple 
tables, the unique key otherwise). `close()` should validate only the rules of 
the table this writer is responsible for — using the same table-selection 
decision as `write()` — instead of waiting for unrelated writers.
   
   Changes:
   - remove `WAIT_SINK_WRITER_COMPLETE_TIME` and the `Thread.sleep`
   - filter `assertRowRules` in `close()` by the writer's own 
`catalogTableName` when multiple tables are configured
   - add `AssertSinkWriterCloseTest` covering the multi-table close behavior 
and the MIN_ROW validation on the writer's own table
   
   ### Does this PR introduce _any_ user-facing change?
   
   No; assertion semantics are unchanged for single-table jobs, and multi-table 
jobs now fail fast with accurate per-table counts instead of relying on a fixed 
delay.
   
   ### How was this patch tested?
   
   - `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-assert`
   - `AssertSinkWriterCloseTest` (2 tests) passes with the fix, and the 
regression test fails against the previous implementation (table B's 
unfulfilled MIN_ROW rule is no longer asserted by table A's writer).


-- 
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]

Reply via email to