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


##########
be/src/vec/exec/scan/vscan_node.h:
##########
@@ -467,8 +451,8 @@ class VScanNode : public ExecNode, public 
RuntimeFilterConsumer {
                                       const std::string& fn_name, int 
slot_ref_child = -1);
 
     // Submit the scanner to the thread pool and start execution
-    void _start_scanners(const std::list<std::shared_ptr<ScannerDelegate>>& 
scanners,
-                         const int query_parallel_instance_num);
+    Status _start_scanners(const std::list<VScannerSPtr>& scanners,
+                           const int query_parallel_instance_num);

Review Comment:
   warning: parameter 'query_parallel_instance_num' is const-qualified in the 
function declaration; const-qualification of parameters only has an effect in 
function definitions [readability-avoid-const-params-in-decls]
   
   ```suggestion
                              int query_parallel_instance_num);
   ```
   



##########
be/src/vec/exec/scan/vscan_node.cpp:
##########
@@ -322,8 +318,8 @@ Status VScanNode::_init_profile() {
     return Status::OK();
 }
 
-void VScanNode::_start_scanners(const 
std::list<std::shared_ptr<ScannerDelegate>>& scanners,
-                                const int query_parallel_instance_num) {
+Status VScanNode::_start_scanners(const std::list<VScannerSPtr>& scanners,

Review Comment:
   warning: method '_start_scanners' can be made const 
[readability-make-member-function-const]
   
   be/src/vec/exec/scan/vscan_node.cpp:321:
   ```diff
   -                                   const int query_parallel_instance_num) {
   +                                   const int query_parallel_instance_num) 
const {
   ```
   



##########
be/src/vec/exec/scan/vscan_node.cpp:
##########
@@ -334,29 +330,41 @@
                                                      
_output_row_descriptor.get(), scanners,
                                                      limit(), 
_state->scan_queue_mem_limit());
     }
+    return Status::OK();
 }
 
 Status VScanNode::close(RuntimeState* state) {
     if (is_closed()) {
         return Status::OK();
     }
-
     RETURN_IF_ERROR(ExecNode::close(state));
     return Status::OK();
 }
 
 void VScanNode::release_resource(RuntimeState* state) {
     if (_scanner_ctx) {
-        if (!state->enable_pipeline_exec() || _should_create_scanner) {
+        if (!state->enable_pipeline_exec()) {
             // stop and wait the scanner scheduler to be done
             // _scanner_ctx may not be created for some short circuit case.
-            _scanner_ctx->stop_scanners(state);
+            _scanner_ctx->set_should_stop();
+            _scanner_ctx->clear_and_join(this, state);
+        } else if (_should_create_scanner) {
+            _scanner_ctx->clear_and_join(this, state);
         }
     }
-    _scanners.clear();
+
     ExecNode::release_resource(state);
 }
 
+Status VScanNode::try_close(RuntimeState* state) {

Review Comment:
   warning: method 'try_close' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/vec/exec/scan/vscan_node.h:158:
   ```diff
   -     Status try_close(RuntimeState* state);
   +     static Status try_close(RuntimeState* state);
   ```
   



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