github-actions[bot] commented on code in PR #62345:
URL: https://github.com/apache/doris/pull/62345#discussion_r3063689507


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java:
##########
@@ -430,6 +430,16 @@ public void resetFailureInfo(FailureReason reason) {
         this.setFailureReason(reason);
         // Currently, only delayMsg is present here, which needs to be cleared 
when the status changes.
         this.setJobRuntimeMsg("");
+        // Clearing the failure (reason == null) means either a task just 
succeeded
+        // or the user is RESUME-ing the job — in both cases, the retry budget 
should
+        // be restored so exponential backoff starts fresh.
+        if (reason == null) {
+            this.setAutoResumeCount(0);

Review Comment:
   This only resets `autoResumeCount`, but `latestAutoResumeTimestamp` still 
carries the last failed retry window. If a user does `RESUME JOB` (or the job 
succeeds once) and then fails again shortly afterward, `autoResumeHandler()` 
can promote the job back to `PENDING` immediately because it compares against 
the stale timestamp. That means the backoff does not actually start fresh as 
the new comment claims.
   
   ```suggestion
           if (reason == null) {
               this.setAutoResumeCount(0);
               this.setLatestAutoResumeTimestamp(0);
           }
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java:
##########
@@ -638,6 +648,7 @@ public void onStreamTaskSuccess(AbstractStreamingTask task) 
throws JobException
         try {
             resetFailureInfo(null);

Review Comment:
   `lastTaskSuccessTime` is serialized and now exposed via `jobs()`, but 
streaming jobs do not replace the whole object on replay. 
`JobManager.replayUpdateJob()` calls `currentJob.replayOnUpdated(replayJob)`, 
and that method currently copies the counters but not this new field. After any 
edit-log replay or FE restart, `LastTaskSuccessTime` falls back to `0`/empty 
for streaming jobs even though it was persisted. Please copy it in 
`replayOnUpdated()` and add a restart/replay test for the new column.



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