liaoxin01 commented on code in PR #34918:
URL: https://github.com/apache/doris/pull/34918#discussion_r1601794086


##########
be/src/runtime/routine_load/routine_load_task_executor.cpp:
##########
@@ -203,6 +203,18 @@ Status 
RoutineLoadTaskExecutor::get_kafka_real_offsets_for_partitions(
     return st;
 }
 
+Status RoutineLoadTaskExecutor::cancel_job(const int64_t job_id) {
+    Status st = Status::Cancelled("routine load is final state, jod id: {}", 
job_id);
+    std::unique_lock<std::mutex> l(_lock);
+    for (const auto& pair : _task_map) {
+        std::shared_ptr<StreamLoadContext> ctx = pair.second;
+        if (ctx->job_id == job_id) {
+            err_handler(ctx, st, std::string(st.msg()));

Review Comment:
   using err_handler to cancel the job?



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