Ivan-gfan commented on PR #13422:
URL: https://github.com/apache/seatunnel/pull/13422#issuecomment-7182338948

   @SEZ9 Thanks for the careful trace. You were right about Issue 1, and 
running it confirmed it. I extended the IT with a LocalFile sink and ran it on 
the previous head `00cdf649a6`: with source 2 / transform 1 the job reached 
`FINISHED` but only 20 of the 40 rows were committed.
   
   The opposite direction also fails. With source 1 / transform 2, the sink 
inherits 2, the aggregated committer waits for a second writer that never 
exists, and the job fails with `Checkpoint expired before completing`.
   
   I followed the direction you preferred, resolving the mismatch where it 
originates, but placed the fix at parse time rather than in plan generation:
   
   - `parseTransform` now gives a transform the parallelism of its upstream and 
logs a warning when a configured value differs. The sink inherits the corrected 
value, so the checkpoint plan, `maxWriterSize` and `SinkWriterContext` all 
agree without touching them. This is the rule 
`PipelineGenerator#splitUnionVertex` already applies when it splits a union, 
and the Flink and Spark starters never read a transform `parallelism`. A single 
change at the source of the value seemed safer than rewriting chained vertices 
in `ExecutionPlanGenerator`, where the chaining, union-split and async-boundary 
paths would each need it.
   - The `Math.max` in `CheckpointCoordinator` is reverted. Instead, 
`PhysicalPlanGenerator` rejects a plan in which an action runs in a different 
number of subtasks than it declares, so any other path that produces a mismatch 
fails at job start instead of losing commits.
   
   Issues 2 to 4:
   
   - **Issue 2:** the transform common options page (en and zh) now states that 
a transform has no parallelism of its own and that a configured value is 
ignored with a warning.
   - **Issue 3:** the IT now writes through LocalFile and asserts the committed 
rows for both directions. With this change both finish with every row committed.
   - **Issue 4:** the Javadoc now refers to #13421 and says the template runs 
with `job.retry.times = 0`.
   
   The PR description, including the test names, has been updated.


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