You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "shuke987 (via GitHub)" <gi...@apache.org> on 2024/01/04 06:43:23 UTC

[PR] Revert "[bugfix](scannerscheduler) should minus num_of_scanners befor… [doris]

shuke987 opened a new pull request, #29513:
URL: https://github.com/apache/doris/pull/29513

   …e check should schedule #28926 (#29331)"
   
   This reverts commit bd8113f4243ed607121a2e76ee69eabd738e32b0.
   
   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] Revert "[bugfix](scannerscheduler) should minus num_of_scanners befor… [doris]

Posted by "shuke987 (via GitHub)" <gi...@apache.org>.
shuke987 closed pull request #29513: Revert "[bugfix](scannerscheduler) should minus num_of_scanners befor…
URL: https://github.com/apache/doris/pull/29513


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] Revert "[bugfix](scannerscheduler) should minus num_of_scanners befor… [doris]

Posted by "shuke987 (via GitHub)" <gi...@apache.org>.
shuke987 commented on PR #29513:
URL: https://github.com/apache/doris/pull/29513#issuecomment-1876497757

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] Revert "[bugfix](scannerscheduler) should minus num_of_scanners befor… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@doris.apache.org

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


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