DanielLeens commented on code in PR #13238:
URL: https://github.com/apache/seatunnel/pull/13238#discussion_r4641634799


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableSink.java:
##########
@@ -90,11 +90,7 @@ public MultiTableSink(MultiTableFactoryContext context) {
         this.sinks = context.getSinks();
         this.replicaNum =
                 
context.getOptions().get(SinkConnectorCommonOptions.MULTI_TABLE_SINK_REPLICA);
-        // replicaNum is the writer count per subtask and becomes the queue 
count and the
-        // thread-pool size in MultiTableSinkWriter. Below 1 there is no 
writer to route a row
-        // to, and Executors.newFixedThreadPool rejects the size with a 
message-less
-        // IllegalArgumentException that names neither this option nor its 
value. Fail here
-        // instead, with both.
+        // Options can also come from callers that construct the sink directly.

Review Comment:
   Thanks, @nzw921rx. The factory path does validate this through OptionRule, 
but it is not the only construction path. The constructor is public, and 
seatunnel-benchmarks/.../MultiTableSinkFixture.java:128 directly constructs 
MultiTableSink without going through FactoryUtil. Keeping the small replica >= 
1 guard in MultiTableSink.java:89-96 protects that real caller before 
writer/executor allocation. The declarative rule and this last 
construction-boundary invariant serve different entry paths; retaining both is 
intentional. I would keep the restored guard and its direct-construction 
regression.
   
   Checked unchanged head `69afe91531ba2aecdad508f952b77591fbbf52dd` against 
`dev`: compare `diverged`, ahead 3 / behind 38. This drift is recorded 
independently; it does not by itself request synchronization. This is a 
discussion/CI follow-up, not another full source review. No local build, test 
or runtime execution was performed. Daniel has READ repository permission; 
effective maintainer approval/dismissal remains a separate repository gate. 
Checked 2026-11-20T11:59:57.811808+00:00.



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