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

   ## Proposed changes
   
   ### Issue
   
   Sometimes external table file cache statistics in profile are lost when 
disable `experimental_enable_pipeline_engine`. 
   
   Because file cache statistics updated to the `RuntimeProfile` in the scanner 
`close()`, but in some case it will called after    `stop_report_thread()` and` 
send_report(true)` in the end of `PlanFragmentExecutor::open()`.  For example: 
a simple sql without aggregation `select * from table limit 10`.  And in this 
case, scanner `close()` will be called in the `PlanFragmentExecutor::close()`.
   
   BTW,  some operation will call `_children[0]->close(state) ` in the `open()` 
functions. So if `_children` is scan node, it will call `close()`.
   
   File cache statistics:
   ```
     -  FileCache:  0ns
         -  BytesScannedFromCache:  599.00  B
         -  BytesScannedFromRemote:  0.00  
         -  BytesWriteIntoCache:  0.00  
         -  LocalIOUseTimer:  5.771us
         -  NumLocalIOTotal:  1
         -  NumRemoteIOTotal:  0
         -  NumSkipCacheIOTotal:  0
         -  RemoteIOUseTimer:  0ns
         -  WriteCacheIOUseTimer:  0ns
   ```
   
   ### Resolution
   This PR use a workaround resolution to update file cache statistics to the 
`RuntimeProfile` in the `FileScanner::_update_counters_before_close()` which 
like `NewOlapScanner`. Because I don't know whether we can put  
   `stop_report_thread()` and` send_report(true)` in 
`PlanFragmentExecutor::close()`.
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@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-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