From 96c7fd04f9f98a238111f66bc3173ae6c87e9d07 Mon Sep 17 00:00:00 2001 From: Yongqiang YANG Date: Thu, 30 May 2024 15:43:52 +0800 Subject: [PATCH] fix --- be/src/olap/rowset/segment_v2/ordinal_page_index.cpp | 6 ++++-- be/src/olap/rowset/segment_v2/zone_map_index.cpp | 4 ++-- be/src/olap/short_key_index.cpp | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/be/src/olap/rowset/segment_v2/ordinal_page_index.cpp b/be/src/olap/rowset/segment_v2/ordinal_page_index.cpp index fc9a676774d559..0fb9d276afe4a6 100644 --- a/be/src/olap/rowset/segment_v2/ordinal_page_index.cpp +++ b/be/src/olap/rowset/segment_v2/ordinal_page_index.cpp @@ -128,7 +128,8 @@ Status OrdinalIndexReader::_load(bool use_page_cache, bool kept_in_memory, _ordinals[_num_pages] = _num_values; g_ordinal_index_memory_bytes << sizeof(*this) + _ordinals.size() * sizeof(ordinal_t) + - _pages.size() * sizeof(PagePointer) + sizeof(OrdinalIndexReader); + _pages.size() * sizeof(PagePointer) + + sizeof(OrdinalIndexReader); return Status::OK(); } @@ -155,7 +156,8 @@ OrdinalPageIndexIterator OrdinalIndexReader::seek_at_or_before(ordinal_t ordinal OrdinalIndexReader::~OrdinalIndexReader() { g_ordinal_index_memory_bytes << -sizeof(*this) - _ordinals.size() * sizeof(ordinal_t) - - _pages.size() * sizeof(PagePointer) - sizeof(OrdinalIndexReader); + _pages.size() * sizeof(PagePointer) - + sizeof(OrdinalIndexReader); } diff --git a/be/src/olap/rowset/segment_v2/zone_map_index.cpp b/be/src/olap/rowset/segment_v2/zone_map_index.cpp index 2caecd217fe475..6a1dee39cd76b6 100644 --- a/be/src/olap/rowset/segment_v2/zone_map_index.cpp +++ b/be/src/olap/rowset/segment_v2/zone_map_index.cpp @@ -177,7 +177,7 @@ Status ZoneMapIndexReader::_load(bool use_page_cache, bool kept_in_memory, } g_zone_map_memory_bytes << sizeof(*this) + sizeof(ZoneMapPB) * _page_zone_maps.size() + - sizeof(IndexedColumnMetaPB); + sizeof(IndexedColumnMetaPB); return Status::OK(); } @@ -185,7 +185,7 @@ Status ZoneMapIndexReader::_load(bool use_page_cache, bool kept_in_memory, ZoneMapIndexReader::~ZoneMapIndexReader() { // Maybe wrong due to load failures. g_zone_map_memory_bytes << -sizeof(*this) - sizeof(ZoneMapPB) * _page_zone_maps.size() - - sizeof(IndexedColumnMetaPB); + sizeof(IndexedColumnMetaPB); } #define APPLY_FOR_PRIMITITYPE(M) \ M(TYPE_TINYINT) \ diff --git a/be/src/olap/short_key_index.cpp b/be/src/olap/short_key_index.cpp index 868089867059cd..94bfb00173b3a1 100644 --- a/be/src/olap/short_key_index.cpp +++ b/be/src/olap/short_key_index.cpp @@ -90,7 +90,7 @@ Status ShortKeyIndexDecoder::parse(const Slice& body, const segment_v2::ShortKey _parsed = true; g_short_key_index_memory_bytes << sizeof(_footer) + _key_data.size + - _offsets.size() * sizeof(uint32_t) + sizeof(*this); + _offsets.size() * sizeof(uint32_t) + sizeof(*this); return Status::OK(); } @@ -98,7 +98,8 @@ Status ShortKeyIndexDecoder::parse(const Slice& body, const segment_v2::ShortKey ShortKeyIndexDecoder::~ShortKeyIndexDecoder() { if (_parsed) { g_short_key_index_memory_bytes << -sizeof(_footer) - _key_data.size - - _offsets.size() * sizeof(uint32_t) - sizeof(*this); + _offsets.size() * sizeof(uint32_t) - + sizeof(*this); } }