Skip to content

Commit 52fa0e7

Browse files
authored
[fix](regression-case) Fix routineload case : test_routine_load_timeout_value (#60664)
### What problem does this PR solve? Issue Number: close #xxx Related PR: #56930 Problem Summary: Under the condition where `isEof = false`, the calculation of the timeout in `updateAdaptiveTimeout `also needs to take into account `Config.routine_load_task_min_timeout_sec`. ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
1 parent 71139d7 commit 52fa0e7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaTaskInfo.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ public void updateAdaptiveTimeout(RoutineLoadJob routineLoadJob) {
125125
if (!isEof) {
126126
long maxBatchIntervalS = Math.max(routineLoadJob.getMaxBatchIntervalS(),
127127
Config.routine_load_adaptive_min_batch_interval_sec);
128-
this.timeoutMs = maxBatchIntervalS * Config.routine_load_task_timeout_multiplier * 1000;
128+
long timeoutSec = maxBatchIntervalS * Config.routine_load_task_timeout_multiplier;
129+
long realTimeoutSec = Math.max(timeoutSec, Config.routine_load_task_min_timeout_sec);
130+
this.timeoutMs = realTimeoutSec * 1000;
129131
} else {
130132
this.timeoutMs = routineLoadJob.getTimeout() * 1000;
131133
}

regression-test/suites/load_p0/routine_load/test_routine_load_timeout_value.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ suite("test_routine_load_timeout_value","nonConcurrent") {
7878
// create table
7979
def jobName = "test_routine_load_timeout_value"
8080
def tableName = "test_routine_load_timeout_value"
81+
82+
// Set routine_load_adaptive_min_batch_interval_sec to a small value to avoid affecting timeout test
83+
sql "ADMIN SET FRONTEND CONFIG ('routine_load_adaptive_min_batch_interval_sec' = '5')"
84+
8185
try {
8286
sql """
8387
CREATE TABLE IF NOT EXISTS ${tableName}
@@ -210,6 +214,8 @@ suite("test_routine_load_timeout_value","nonConcurrent") {
210214
} finally {
211215
sql "stop routine load for ${jobName}"
212216
sql "DROP TABLE IF EXISTS ${tableName} FORCE"
217+
// Restore routine_load_adaptive_min_batch_interval_sec to default value
218+
sql "ADMIN SET FRONTEND CONFIG ('routine_load_adaptive_min_batch_interval_sec' = '360')"
213219
}
214220
}
215221
}

0 commit comments

Comments
 (0)