github-actions[bot] commented on code in PR #60977:
URL: https://github.com/apache/doris/pull/60977#discussion_r2894336795


##########
be/src/io/cache/cached_remote_file_reader.cpp:
##########
@@ -81,6 +81,8 @@ bvar::Adder<uint64_t> g_read_cache_direct_partial_bytes(
 bvar::Adder<uint64_t> 
g_read_cache_indirect_bytes("cached_remote_reader_cache_indirect_bytes");
 bvar::Adder<uint64_t> g_read_cache_indirect_total_bytes(
         "cached_remote_reader_cache_indirect_total_bytes");
+bvar::Adder<uint64_t> g_read_cache_self_heal_on_not_found(

Review Comment:
   [Parallel code path gap] The `enable_read_cache_file_directly` direct-read 
path (lines 336-384 of this file) has the same vulnerability: when a 
`DOWNLOADED` block's local file is missing, `iter->second->read(...)` fails at 
line 360-363 and the code simply `break`s out. There's already a `//TODO: maybe 
read failed because block evict, should handle error` comment there 
acknowledging this gap.
   
   Critically, after `break`, execution falls through to the indirect path with 
`already_read > 0`, causing the indirect path to request a *different* 
(smaller, shifted) range via `s_align_size(offset + already_read, bytes_req - 
already_read, size())`. This means the indirect path's block iteration may 
never encounter the specific stale block, so the self-heal logic added in this 
PR may never trigger for reads going through the direct path.
   
   When `config::enable_read_cache_file_directly` is enabled (which is the 
default for `is_doris_table`), this is the primary read path — so the self-heal 
added here may be bypassed for the most common case.
   
   Consider either:
   1. Adding NOT_FOUND detection + `need_self_heal` in the direct-read path 
too, or
   2. Explicitly documenting this as a known limitation with a follow-up TODO.



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