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

   ### What problem does this PR solve?
   
   Issue Number: DORIS-27148
   
   When a packed small file is written to the file cache, 
`do_write_to_file_cache()` did not set `ctx.tablet_id`, so the cache block meta 
was persisted with `tablet_id=0`. As a result:
   
   1. `information_schema.file_cache_info` shows these blocks under 
`tablet_id=0`, and they cannot be queried by the real tablet id.
   2. TTL blocks are not registered to `BlockFileCacheTtlMgr` (registration is 
skipped when `context.tablet_id == 0`), so the TTL expiration check cannot 
evict them by tablet.
   
   This was introduced when picking #59892 to this branch: the pick dropped the 
`ctx.tablet_id = tablet_id;` line that exists on master. This PR restores it, 
aligning with master.
   
   Note: existing cache meta already persisted with `tablet_id=0` will not be 
rewritten automatically; it is corrected only when the block is evicted and 
cached again.
   
   ### Release note
   
   Fix that file cache blocks written via the packed-file path were recorded 
with tablet_id=0 in information_schema.file_cache_info.
   
   ### Check List (For Author)
   
   - Test
       - [x] Manual test (add detailed scripts or steps below)
       - Verified per DORIS-27148: write small segments that go through the 
packed-file path, then query `information_schema.file_cache_info` by the real 
tablet ids and confirm blocks are no longer recorded under tablet_id=0.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


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