CryoThrust commented on issue #12116:
URL: https://github.com/apache/seatunnel/issues/12116#issuecomment-5556462585

   I traced this against the published Assert contract. The English and Chinese 
docs say that MIN_ROW/MAX_ROW are evaluated against the cumulative rows 
received by that Writer instance since it was created. That makes the static 
JVM-wide LONG_ACCUMULATOR incompatible with the documented scope: writers can 
observe partial totals, totals from sibling subtasks, and values left by 
another job or attempt in the same TaskManager JVM.
   
   For the row-count rules, the smallest contract-preserving fix appears to be 
instance-owned counters, for example a per-writer map keyed by table, with a 
regression test that creates two writers for the same table and verifies that 
closing one is unaffected by rows written to the other.
   
   There is a separate semantic question for the static TABLE_NAMES set: should 
table-names be the union across all parallel writers, or the set observed by 
each writer? An instance-local set is consistent with the current per-Writer 
wording but could change multi-table validation; a global union would require 
an explicit aggregation/lifecycle point rather than JVM statics. Could a 
maintainer confirm that intended scope before implementation?


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