morningman commented on a change in pull request #8248:
URL: https://github.com/apache/incubator-doris/pull/8248#discussion_r815380025



##########
File path: samples/doris-demo/README.md
##########
@@ -35,6 +35,14 @@ Provide usage examples of Doris stream load, including file 
and memory data impo
 
 Provides the use of Spring to integrate Doris, and provides external data 
access interfaces
 
+# rpc-udf-java-demo
+
+Provides an example of how to implements an Doris udf function service in java 
+
+# rpc-udf-cpp-demo
+
+Provides an example of how to implements an Doris udf function service in java 

Review comment:
       ```suggestion
   Provides an example of how to implements an Doris udf function service in 
CPP 
   ```

##########
File path: docs/zh-CN/extending-doris/udf/remote-user-defined-function.md
##########
@@ -24,7 +24,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# Remote User Defined Function Service
+# 远程UDF

Review comment:
       可以在这个文章中列出 demo 的代码位置,以方便用户查看。
   不然用户不太可能去 doris-demo 文档中查找。

##########
File path: be/src/service/function_service.h
##########
@@ -0,0 +1,125 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include "common/status.h"
+#include "gen_cpp/function_service.pb.h"
+#include "runtime/cache/result_cache.h"
+#include "runtime/decimalv2_value.h"
+#include "util/priority_thread_pool.hpp"
+
+namespace brpc {
+class Controller;
+}
+
+namespace doris {
+
+class ExecEnv;
+
+class PFunctionServiceImpl : public PFunctionService {

Review comment:
       What is this class for? A demo?

##########
File path: be/src/runtime/fragment_mgr.cpp
##########
@@ -250,15 +247,18 @@ Status FragmentExecState::cancel_before_execute() {
     return Status::OK();
 }
 
-Status FragmentExecState::cancel(const PPlanFragmentCancelReason& reason) {
-    std::lock_guard<std::mutex> l(_status_lock);
-    RETURN_IF_ERROR(_exec_status);
-    if (reason == PPlanFragmentCancelReason::LIMIT_REACH) {
-        _executor.set_is_report_on_cancel(false);
-    }
-    _executor.cancel();
-    if (_pipe != nullptr) {
-        _pipe->cancel(PPlanFragmentCancelReason_Name(reason));
+Status FragmentExecState::cancel(const PPlanFragmentCancelReason& reason, 
const std::string& msg) {
+    if (!_cancelled) {
+        _cancelled = true;

Review comment:
       No need to protect with `_status_lock`?




-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to