Doris-Breakwater commented on issue #71131:
URL: https://github.com/apache/doris/issues/71131#issuecomment-7265870346

   Thanks for the detailed report. I verified a recovery gap in [4.1.5 at 
`917b20be838`](https://github.com/apache/doris/commit/917b20be83878e98f94e3ebf7efccc80346e3e50).
 A malformed page served repeatedly from one BE's data-page cache could explain 
the persistence and recovery you observed. A cache hit for the failing page, 
the cause of the mismatch, and eviction at recovery all remain to be verified.
   
   **What the release does.** `FileColumnIterator::_read_data_page()` calls 
`PageIO` and then `ParsedPage::create()`, which strips the null bitmap before 
initializing the decoder. The reported `INTERNAL_ERROR` comes from that last 
step, after `PageIO` has returned. Changing this error to `CORRUPTION` alone 
would therefore leave the query behavior unchanged. The release's `PageIO` 
retry handles corruption detected inside `PageIO` with a cloud cached-file 
reader and invalidates the **file cache**. The master `retry_original` path 
cited above is gated on read-ahead and absent from 4.1.5 and the checked 
`branch-4.1` head. I couldn't verify an upstream fix for this report. [Release 
iterator](https://github.com/apache/doris/blob/917b20be838/be/src/storage/segment/column_reader.cpp#L2055-L2070)
 · [Release 
retry](https://github.com/apache/doris/blob/917b20be838/be/src/storage/segment/page_io.cpp#L276-L323)
 · [Checked 4.1 branch 
tip](https://github.com/apache/doris/commit/f92adba6131aac5592
 38c76420952625e65624b9) · [Master read-ahead 
change](https://github.com/apache/doris/pull/70563)
   
   **Where to trace the 18 bytes.** The `65570` is the decoded value slice 
length seen by Bitshuffle. The expected `65552` comes from the decoded header 
and values (16 + 16,384 × 4). On a miss, `PageIO` passes a fixed-size 
`PagePointer.size` buffer to the reader, normally verifies the on-disk CRC32C, 
then decompresses and pre-decodes the page. The Bitshuffle pre-decoder builds a 
new slice from the decoded length plus the null bitmap and footer tail. In the 
ordinary path those tail lengths cancel when `PageIO` and `ParsedPage` strip 
them. On a hit, `PageIO` derives the body length from the cached page length 
and stored footer length, and `ParsedPage` subtracts `nullmap_size`. A 
discrepancy between those lengths or the cached representation is worth 
checking. Block-aligned file-cache reads still copy into the fixed-length 
caller buffer. The range GET is useful evidence about the source bytes. The 
exact pointer range, footer, and checksum are needed to compare the on-disk 
page with wha
 t the failing BE decoded. [Release page 
read](https://github.com/apache/doris/blob/917b20be838/be/src/storage/segment/page_io.cpp#L131-L269)
 · [Bitshuffle 
pre-decode](https://github.com/apache/doris/blob/917b20be838/be/src/storage/segment/bitshuffle_page_pre_decoder.h#L50-L95)
 · [Parsed 
page](https://github.com/apache/doris/blob/917b20be838/be/src/storage/segment/parsed_page.h#L45-L61)
   
   **4.1.5 workaround and evidence.** If it recurs, first try the same scan in 
a session with `SET enable_page_cache = false;` and verify it reads the same 
rowset, segment, and page on the affected BE. That bypasses data-page cache 
lookups and inserts for the OLAP scan. If you need to clear the cache, the BE 
admin endpoint `GET /api/clear_cache/DataPageCache` prunes unpinned data pages 
across that BE, so expect a cold-cache cost. I found no supported per-file 
flush for `StoragePageCache`. [Scan 
options](https://github.com/apache/doris/blob/917b20be838/be/src/exec/scan/olap_scanner.cpp#L444)
 · [Cache 
endpoint](https://github.com/apache/doris/blob/917b20be838/be/src/service/http_service.cpp#L182-L185)
 · [Cache 
type](https://github.com/apache/doris/blob/917b20be838/be/src/runtime/memory/cache_policy.h#L120-L124)
   
   - Please share the first failing `be.INFO` warning containing `failed to 
create ParsedPage`, related warnings around the cold scan, query IDs, 
timestamps with timezone, and the cache-related BE and session settings, and 
the affected column's type and encoding if known. The warning should give the 
exact segment, page offset, size, and index. A consistently redacted path is 
fine. If this uses packed storage, include the mapping from the logical page to 
the object range.
   - For that exact page, the GET's `Content-Range`, footer length, footer 
`uncompressed_size`, `nullmap_size`, and stored versus computed CRC32C would 
help. If it can be instrumented, record the page-cache hit or miss, the slice 
lengths at insertion and lookup, and the 16-byte Bitshuffle header and 
decoder-input length. Metadata and lengths are enough to start.
   
   For maintainers, I'd test a bounded retry at the iterator's validation step 
after `PageIO` for this integrity failure on a confirmed cache hit. Evict that 
exact data-page key, retry once with the page cache bypassed, and propagate any 
fresh-read failure. A regression test with a valid backing page and a malformed 
cached entry would verify recovery while the original cause is investigated.
   
   Breakwater-GitHub-Analysis-Slot: slot_15e119316b1d
   


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