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


##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java:
##########
@@ -2033,6 +2033,7 @@ public void gsonPostProcess() throws IOException {
             }
         } catch (Exception e) {
             this.state = JobState.CANCELLED;
+            this.cancelReason = new 
ErrorReason(InternalErrorCode.INTERNAL_ERR, e.getMessage());

Review Comment:
   [P1] Make the reported cancellation reason durable and actionable
   
   This assignment fixes only the current deserialization. 
`RoutineLoadJob.write()` uses `GsonUtils.GSON`, whose 
`HiddenAnnotationExclusionStrategy` omits fields without `@SerializedName`; 
`cancelReason` is unannotated even though `state` is persisted. A later 
checkpoint can therefore store `CANCELLED` but drop this reason, and if the 
original statement validates on the next restart, `SHOW ALL ROUTINE LOAD` is 
empty again. There is also a first-load path where `getDb(dbId).get()` handles 
a missing database by throwing `NoSuchElementException`, so `e.getMessage()` is 
only "No value present" and does not identify the database. Please use a 
context-rich lookup, persist the reason without overwriting an already 
persisted terminal reason, and add a failing-postprocess -> SHOW/RPC -> 
checkpoint -> reload test (including the missing-database case).



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