dataroaring commented on code in PR #56930:
URL: https://github.com/apache/doris/pull/56930#discussion_r2427992178
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskInfo.java:
##########
@@ -186,6 +188,21 @@ private void judgeEof(RLTaskTxnCommitAttachment
rlTaskTxnCommitAttachment) {
}
}
+ private void adaptiveMaxBatchInterval(RLTaskTxnCommitAttachment
rlTaskTxnCommitAttachment) {
+ RoutineLoadJob routineLoadJob = routineLoadManager.getJob(jobId);
+ if (rlTaskTxnCommitAttachment.getTotalRows() <
routineLoadJob.getMaxBatchRows()
+ && rlTaskTxnCommitAttachment.getReceivedBytes() <
routineLoadJob.getMaxBatchSizeBytes()
+ && rlTaskTxnCommitAttachment.getTaskExecutionTimeMs() >=
routineLoadJob.getMaxBatchIntervalS()) {
+ if (routineLoadJob.getMaxBatchIntervalS() <
Config.routine_load_adaptive_max_batch_interval_sec) {
+ routineLoadJob.setMaxBatchIntervalS(
+
Math.min(Config.routine_load_adaptive_max_batch_interval_sec,
+ routineLoadJob.getMaxBatchIntervalS() * 2));
+ LOG.info("adaptive increase max_batch_interval, job id:{}, new
max_batch_interval:{}",
Review Comment:
When do the interval recover to a smaller one? e.g. if user specifies 10
seconds.
##########
fe/fe-common/src/main/java/org/apache/doris/common/Config.java:
##########
@@ -1243,6 +1243,12 @@ public class Config extends ConfigBase {
@ConfField(mutable = true, masterOnly = true)
public static int routine_load_blacklist_expire_time_second = 300;
+ /**
+ * Upper bound of adaptive max_batch_interval_sec.
+ */
+ @ConfField(mutable = true, masterOnly = true)
+ public static int routine_load_adaptive_max_batch_interval_sec = 180;
Review Comment:
set default to 360 seconds? 180 is too small.
--
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]