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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary: FileCacheFactory::clear_file_caches(true) used to call 
BlockFileCache::clear_file_cache_directly(), which clears storage and cache 
indexes without respecting FileBlock holder lifetime. This changes the sync 
branch to use a lightweight clear_file_cache_sync() wrapper that pauses the TTL 
manager and reuses the existing safe async cleanup scan. Releasable blocks are 
removed through the normal recycle path, and held blocks are marked deleting 
until their holders release them.
   
   ### Release note
   
   File cache clear with sync=true now performs a safe clear scan and no longer 
promises that all physical files, recycle queue entries, or meta records are 
fully drained before return.
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - git diff --check
       - PATH=/mnt/disk1/zhangzhengyu/build-dep/ldb_toolchain.back/bin:$PATH 
build-support/check-format.sh
       - JAVA_HOME=/mnt/disk1/zhangzhengyu/build-dep/jdk-17.0.2/ 
DORIS_TOOLCHAIN=clang DISABLE_BE_JAVA_EXTENSIONS=ON ENABLE_INJECTION_POINT=ON 
ENABLE_CACHE_LOCK_DEBUG=0 ENABLE_PCH=0 sh run-be-ut.sh --run 
--filter='BlockFileCacheTest.clear_file_cache_sync_uses_safe_async_cleanup:BlockFileCacheTest.file_cache_factory_sync_clear_uses_safe_sync_wrapper:BlockFileCacheTest.file_cache_factory_async_clear_keeps_async_branch:BlockFileCacheTest.recyle_cache_async:BlockFileCacheTest.recyle_cache_async_ttl:BlockFileCacheTest.late_holder_remove_skips_missing_cache_cell:BlockFileCacheTest.late_holder_remove_skips_replaced_cache_cell:BlockFileCacheTest.test_factory_1'
   - Behavior changed: Yes. sync=true clear no longer uses direct 
directory-level deletion and does not wait for recycle queue or meta drain.
   - Does this need documentation: No


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