This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 24bd4878f2f [fix](segment) add _pk_index_meta's size to
Segment::_meta_mem_usage (#36329)
24bd4878f2f is described below
commit 24bd4878f2f5387d61802239d6b22152ae2fe323
Author: zhannngchen <[email protected]>
AuthorDate: Mon Jun 17 16:16:02 2024 +0800
[fix](segment) add _pk_index_meta's size to Segment::_meta_mem_usage
(#36329)
## Proposed changes
Issue Number: close #xxx
add _pk_index_meta's size to Segment::_meta_mem_usage
to make memory estimation more accurate.
---
be/src/olap/rowset/segment_v2/segment.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/be/src/olap/rowset/segment_v2/segment.cpp
b/be/src/olap/rowset/segment_v2/segment.cpp
index d31e4865562..69118eb2782 100644
--- a/be/src/olap/rowset/segment_v2/segment.cpp
+++ b/be/src/olap/rowset/segment_v2/segment.cpp
@@ -120,6 +120,9 @@ Status Segment::_open() {
// An estimated memory usage of a segment
_meta_mem_usage += _footer_pb->ByteSizeLong();
+ if (_pk_index_meta != nullptr) {
+ _meta_mem_usage += _pk_index_meta->ByteSizeLong();
+ }
_meta_mem_usage += sizeof(*this);
_meta_mem_usage += _tablet_schema->num_columns() *
config::estimated_mem_per_column_reader;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]