dataroaring commented on code in PR #56361:
URL: https://github.com/apache/doris/pull/56361#discussion_r2428516986


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -242,6 +242,13 @@ public class SessionVariable implements Serializable, 
Writable {
     // then the coordinator be will use the value of 
`max_send_batch_parallelism_per_job`
     public static final String SEND_BATCH_PARALLELISM = 
"send_batch_parallelism";
 
+    // set the row count threshold for random distribution tablet switching
+    // when load_to_single_tablet is false (default), data will be written to 
one tablet
+    // until the row count reaches this threshold, then switch to the next 
tablet
+    // this applies to INSERT INTO SELECT statements
+    public static final String RANDOM_DISTRIBUTION_TABLET_SWITCHING_THRESHOLD
+            = "random_distribution_tablet_switching_threshold";

Review Comment:
   Is random_bucket_switching_threshold a better name?



##########
fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java:
##########
@@ -166,6 +173,14 @@ public void init(TUniqueId loadId, long txnId, long dbId, 
long loadChannelTimeou
         }
         tSink.setLoadToSingleTablet(loadToSingleTablet);
         tSink.setTxnTimeoutS(txnExpirationS);
+        if (randomTabletSwitchingThreshold > 0) {
+            LOG.info("OlapTableSink: setting 
tSink.setRandomTabletSwitchingThreshold = {}",
+                     randomTabletSwitchingThreshold);
+            
tSink.setRandomTabletSwitchingThreshold(randomTabletSwitchingThreshold);
+        } else {
+            LOG.info("OlapTableSink: randomTabletSwitchingThreshold <= 0, not 
setting. value = {}",

Review Comment:
   should be debug.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to