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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   The file cache TTL manager keeps registered tablet ids in `_tablet_id_set`. 
For ordinary non-TTL tablets, the previous `ttl_seconds <= 0` path always set 
`need_convert_from_ttl = true`, so every update round scanned cached blocks 
even when the tablet had never been recorded in `_ttl_info_map`.
   
   This PR only triggers TTL-to-NORMAL conversion when 
`_ttl_info_map.erase(tablet_id)` actually removes an existing TTL record. 
Ordinary non-TTL tablets still have their tablet meta checked, but skip the 
expensive block scan.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [x] 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?  -->
   
   Unit test:
   
   ```bash
   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='BlockFileCacheTtlMgrTest.*'
   ```
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Ordinary non-TTL tablets no longer scan cached blocks in each 
TTL manager update round unless they previously had TTL info and need 
conversion back to NORMAL.
   
   - 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 -->
   


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