github-actions[bot] commented on code in PR #61518:
URL: https://github.com/apache/doris/pull/61518#discussion_r3643856895
##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -1113,6 +1117,8 @@ FileBlockCell* BlockFileCache::add_cell(const
UInt128Wrapper& hash, const CacheC
key.meta.type = context.cache_type;
key.meta.expiration_time = context.expiration_time;
key.meta.tablet_id = context.tablet_id;
+ key.meta.table_name = context.table_name;
Review Comment:
[P2] Propagate context through normal write-through fills
The ordinary write-through path can create this cell before any scanner
supplies these fields. `FileCacheAllocatorBuilder::allocate_cache_holder()`
gives the S3/HDFS writers a context with cache type/TTL/coldness/tablet ID
only, while `PackedFileManager` independently constructs the same anonymous
context; all of them can finalize and persist the block. A later named scan
only reuses the existing cell, so `FILE_CACHE_INFO` keeps empty table/partition
labels until eviction. Please propagate stable table/partition identity from
rowset/tablet metadata into both writer paths (or safely late-bind an anonymous
cell), and cover a write-through-before-query case.
##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -1113,6 +1117,8 @@ FileBlockCell* BlockFileCache::add_cell(const
UInt128Wrapper& hash, const CacheC
key.meta.type = context.cache_type;
key.meta.expiration_time = context.expiration_time;
key.meta.tablet_id = context.tablet_id;
+ key.meta.table_name = context.table_name;
Review Comment:
[P2] Define attribution for cache blocks shared by external tables
External cache identity is derived only from `path + mtime`, so two catalog
aliases or overlapping external-table locations that reference the same object
deliberately share this hash and offsets. Persisting one table/partition pair
here makes `FILE_CACHE_INFO` report whichever logical table reads the file
first; the other live owner cannot be represented, and reversing cold-read
order changes the result. Please define shared attribution explicitly
(association records, logical identity in the key, or a shared/ambiguous
marker) and test two table aliases over the same file in both read orders.
--
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]