From c18baa34969390986a7ba0c5087bb4fdf5ac67a5 Mon Sep 17 00:00:00 2001 From: Maksim Ryzhukhin Date: Fri, 7 Aug 2026 01:28:15 +0200 Subject: [PATCH] [fix](streaming) avoid infinite retry when cloud mode job progress is not found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In compute-storage-decoupled (cloud) mode, replayOnCloudMode() asks MetaService for a streaming job's persisted progress. When MetaService answers STREAMING_JOB_PROGRESS_NOT_FOUND, the method logs a warning and returns void. The caller cannot tell 'no progress exists' from 'progress loaded successfully', so it repeats the RPC on every scheduler tick indefinitely, flooding the log and leaving the job stuck in PENDING. Fix: - Change replayOnCloudMode() to return boolean (false on NOT_FOUND). - Add a transient cloudProgressMissing flag that short-circuits subsequent attempts so the pointless RPC is not re-issued on every tick or journal entry. - Clear the flag in afterCommitted() when the job actually persists progress, enabling recovery after MetaService later stores valid state. The flag is intentionally transient (not serialized): it resets on FE restart, which gives MetaService another chance if the issue was temporary. This is the correct behavior — a permanent NOT_FOUND is expected for newly created jobs that have not yet committed their first transaction. --- .../insert/streaming/StreamingInsertJob.java | 41 +++++++++++++++---- .../streaming/StreamingJobSchedulerTask.java | 6 ++- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java index affb6d6c5992fd..d74bca6ee68cd2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java @@ -196,6 +196,12 @@ public class StreamingInsertJob extends AbstractJob