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


##########
be/src/core/column/column_vector.h:
##########
@@ -260,41 +310,64 @@ class ColumnVector final : public COWHelper<IColumn, 
ColumnVector<T>> {
     void update_hashes_with_value(uint64_t* __restrict hashes,

Review Comment:
   `allocated_bytes()` now deliberately excludes the borrowed page span, but 
`insert_many_fix_len_data_with_owner()` can borrow non-page-cache `PageHandle` 
memory as well as page-cache memory. When `opts.use_page_cache` is false or the 
cache is unavailable, `PageIO` stores the decompressed page in a `DataPage` 
owned by `PageHandle`, and `ParsedPage` passes that handle down to 
`PlainPageDecoder`/`BitShufflePageDecoder`; an output `ColumnVector` can then 
pin the whole page through `_external_owner`. The allocation is still on the 
query mem tracker, but every block-level control that sums 
`Block::allocated_bytes()` now sees only the empty PODArray: scanner queue 
accounting in `ScannerScheduler`/`ScannerContext`, sorter buffer sizing, and 
spill thresholds can all treat a block that retains page memory as almost free. 
Please either restrict zero-copy adoption to cache-owned pages, or include 
non-cache owner bytes in this column's `allocated_bytes()` while the external 
span is held.



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