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


##########
be/src/core/column/column_varbinary.h:
##########
@@ -145,11 +152,15 @@ class ColumnVarbinary final : public COWHelper<IColumn, 
ColumnVarbinary> {
     void insert_indices_from(const IColumn& src, const uint32_t* indices_begin,
                              const uint32_t* indices_end) override;
 
-    size_t allocated_bytes() const override { return _data.allocated_bytes() + 
_arena.size(); }
+    size_t allocated_bytes() const override {
+        DCHECK(_arena != nullptr);

Review Comment:
   `filter()` and `permute()` can now make the result retain the source arena 
through `_auxiliary_data`, but this accounting still only includes the result 
column's fresh local `_arena`. After a filtered/permuted block keeps a large 
non-inline VARBINARY payload alive and the source is cleared or reused, 
`Block::allocated_bytes()` and `Block::bytes()` will sum these methods and 
under-report the retained payload memory. That bypasses the memory 
counters/backpressure paths that rely on block size. Please either keep copying 
non-inline payloads for derived columns, or make auxiliary owners contribute to 
`byte_size()`/`allocated_bytes()` without double-counting.



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