liaoxin01 commented on code in PR #35266:
URL: https://github.com/apache/doris/pull/35266#discussion_r1629551899
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/ScheduleRule.java:
##########
@@ -77,19 +69,25 @@ public static boolean isNeedAutoSchedule(RoutineLoadJob
jobRoutine) {
return false;
}
- if (jobRoutine.firstResumeTimestamp == 0) { //the first resume
- jobRoutine.firstResumeTimestamp = System.currentTimeMillis();
+ if (jobRoutine.latestResumeTimestamp == 0) { //the first resume
+ jobRoutine.latestResumeTimestamp = System.currentTimeMillis();
jobRoutine.autoResumeCount = 1;
return true;
} else {
long current = System.currentTimeMillis();
- if (current - jobRoutine.firstResumeTimestamp <
Config.period_of_auto_resume_min * 60000L) {
- if (jobRoutine.autoResumeCount >= 3) {
- jobRoutine.autoResumeLock = true; // locked Auto
Resume RoutineLoadJob
- return false;
+ if (current - jobRoutine.latestResumeTimestamp <
Config.period_of_auto_resume_min * 60000L) {
+ long autoResumeIntervalTimeSec =
+ Math.min((long) Math.pow(BACK_OFF_BASIC_TIME_SEC,
jobRoutine.autoResumeCount),
Review Comment:
It's better to use the power of 2 to achieve backoff.
--
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]