This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 74109427066 [improvement](cloud) only add filecache profile for olap 
table in cloud deploy mode (#52118)
74109427066 is described below

commit 741094270667fe619fdde9bbb2e66d4f444d7aa5
Author: Wen Zhenghu <[email protected]>
AuthorDate: Tue Oct 14 10:56:59 2025 +0800

    [improvement](cloud) only add filecache profile for olap table in cloud 
deploy mode (#52118)
    
    in local deploy mode. we could not use filecache when read olap
    table(internal table), but in query profile "SegmentIterator" will add
    FileCache counters, with all counters value are zero.
    
    this pr fix it. if olap table, only add filecache profile in cloud
    deploy mode. and only if filecache is enabled(keep the same behavior as
    FileScanner)
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test <!-- At least one of them must be included. -->
        - [x] Regression test
        - [ ] Unit Test
        - [ ] Manual test (add detailed scripts or steps below)
        - [ ] No need to test or manual test. Explain why:
    - [ ] This is a refactor/code format and no logic has been changed.
            - [ ] Previous test can cover this change.
            - [ ] No code files have been changed.
            - [ ] Other reason <!-- Add your reason?  -->
    
    - Behavior changed:
        - [ ] No.
        - [x] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [x] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [ ] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 be/src/vec/exec/scan/olap_scanner.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/exec/scan/olap_scanner.cpp 
b/be/src/vec/exec/scan/olap_scanner.cpp
index 834acd44625..3cc246683d2 100644
--- a/be/src/vec/exec/scan/olap_scanner.cpp
+++ b/be/src/vec/exec/scan/olap_scanner.cpp
@@ -766,7 +766,9 @@ void OlapScanner::_collect_profile_before_close() {
     inverted_index_profile.update(local_state->_index_filter_profile.get(),
                                   &stats.inverted_index_stats);
 
-    if (config::enable_file_cache) {
+    // only cloud deploy mode will use file cache. and keep the same with 
FileScanner
+    if (config::is_cloud_mode() && config::enable_file_cache &&
+        _state->query_options().enable_file_cache) {
         io::FileCacheProfileReporter 
cache_profile(local_state->_segment_profile.get());
         cache_profile.update(&stats.file_cache_stats);
         
_state->get_query_ctx()->resource_ctx()->io_context()->update_bytes_write_into_cache(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to