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

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


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new bf5bcc12d96 branch-4.0: [fix](filecache) fix filecache microbench bvar 
#56360 (#56586)
bf5bcc12d96 is described below

commit bf5bcc12d96450c186f3f069c77966662f306c44
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Sep 29 11:17:12 2025 +0800

    branch-4.0: [fix](filecache) fix filecache microbench bvar #56360 (#56586)
    
    Cherry-picked from #56360
    
    Signed-off-by: zhengyu <[email protected]>
    Co-authored-by: zhengyu <[email protected]>
---
 be/CMakeLists.txt                         | 4 ----
 be/src/io/cache/block_file_cache.h        | 4 ----
 be/src/io/tools/file_cache_microbench.cpp | 8 +++++---
 build.sh                                  | 6 ------
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 616cb788a7d..e8a020fc4e3 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -374,10 +374,6 @@ if (ENABLE_INJECTION_POINT)
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DENABLE_INJECTION_POINT")
 endif()
 
-if (ENABLE_CACHE_LOCK_DEBUG)
-    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DENABLE_CACHE_LOCK_DEBUG")
-endif()
-
 # Compile with jemalloc.
 # Adding the option `USE_JEMALLOC=ON sh build.sh` when compiling can turn on 
building with jemalloc
 if (USE_JEMALLOC)
diff --git a/be/src/io/cache/block_file_cache.h 
b/be/src/io/cache/block_file_cache.h
index ae9d412789c..512de17b52e 100644
--- a/be/src/io/cache/block_file_cache.h
+++ b/be/src/io/cache/block_file_cache.h
@@ -56,7 +56,6 @@ private:
 };
 
 // Note: the cache_lock is scoped, so do not add do...while(0) here.
-#ifdef ENABLE_CACHE_LOCK_DEBUG
 #define SCOPED_CACHE_LOCK(MUTEX, cache)                                        
                   \
     std::chrono::time_point<std::chrono::steady_clock> start_time =            
                   \
             std::chrono::steady_clock::now();                                  
                   \
@@ -71,9 +70,6 @@ private:
                      << get_stack_trace() << std::endl;                        
                   \
     }                                                                          
                   \
     LockScopedTimer cache_lock_timer;
-#else
-#define SCOPED_CACHE_LOCK(MUTEX, cache) std::lock_guard cache_lock(MUTEX);
-#endif
 
 class FSFileCacheStorage;
 
diff --git a/be/src/io/tools/file_cache_microbench.cpp 
b/be/src/io/tools/file_cache_microbench.cpp
index 55dd302a624..0feb373ed9c 100644
--- a/be/src/io/tools/file_cache_microbench.cpp
+++ b/be/src/io/tools/file_cache_microbench.cpp
@@ -330,7 +330,7 @@ public:
         if (read_bvar) {
             SCOPED_BVAR_LATENCY(*read_bvar);
         }
-        SCOPED_BVAR_LATENCY(microbench_write_latency);
+        SCOPED_BVAR_LATENCY(microbench_read_latency);
         return _base_reader->read_at(offset, result, bytes_read, io_ctx);
     }
 
@@ -1312,12 +1312,14 @@ private:
                                 file_size = exist_job_perfile_size;
                             }
 
-                            // Verify read data
+#if 0 // TODO(dengxin): fix verify \
+        // Verify read data
                             if (!DataVerifier::verify_data(key, file_size, 
read_offset, read_buffer,
                                                            read_length)) {
                                 throw std::runtime_error("Data verification 
failed for key: " +
                                                          key);
                             }
+#endif
 
                             LOG(INFO)
                                     << "read_offset=" << read_offset
@@ -2435,4 +2437,4 @@ int main(int argc, char* argv[]) {
     LOG(INFO) << "Program exiting normally";
     return 0;
 }
-#endif
\ No newline at end of file
+#endif
diff --git a/build.sh b/build.sh
index b4f19fdb9f0..44ff05442c6 100755
--- a/build.sh
+++ b/build.sh
@@ -449,10 +449,6 @@ if [[ -z "${ENABLE_INJECTION_POINT}" ]]; then
     ENABLE_INJECTION_POINT='OFF'
 fi
 
-if [[ -z "${ENABLE_CACHE_LOCK_DEBUG}" ]]; then
-    ENABLE_CACHE_LOCK_DEBUG='ON'
-fi
-
 if [[ -z "${BUILD_BENCHMARK}" ]]; then
     BUILD_BENCHMARK='OFF'
 fi
@@ -506,7 +502,6 @@ echo "Get params:
     USE_JEMALLOC                        -- ${USE_JEMALLOC}
     USE_BTHREAD_SCANNER                 -- ${USE_BTHREAD_SCANNER}
     ENABLE_INJECTION_POINT              -- ${ENABLE_INJECTION_POINT}
-    ENABLE_CACHE_LOCK_DEBUG             -- ${ENABLE_CACHE_LOCK_DEBUG}
     DENABLE_CLANG_COVERAGE              -- ${DENABLE_CLANG_COVERAGE}
     DISPLAY_BUILD_TIME                  -- ${DISPLAY_BUILD_TIME}
     ENABLE_PCH                          -- ${ENABLE_PCH}
@@ -603,7 +598,6 @@ if [[ "${BUILD_BE}" -eq 1 ]]; then
         -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
         -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
         -DENABLE_INJECTION_POINT="${ENABLE_INJECTION_POINT}" \
-        -DENABLE_CACHE_LOCK_DEBUG="${ENABLE_CACHE_LOCK_DEBUG}" \
         -DMAKE_TEST=OFF \
         -DBUILD_BENCHMARK="${BUILD_BENCHMARK}" \
         -DBUILD_FS_BENCHMARK="${BUILD_FS_BENCHMARK}" \


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

Reply via email to