Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed May 30, 2024
1 parent dddd55f commit 96c7fd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions be/src/olap/rowset/segment_v2/ordinal_page_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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);
}


Expand Down
4 changes: 2 additions & 2 deletions be/src/olap/rowset/segment_v2/zone_map_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ 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();
}

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) \
Expand Down
5 changes: 3 additions & 2 deletions be/src/olap/short_key_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,16 @@ 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();
}

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);
}
}

Expand Down

0 comments on commit 96c7fd0

Please sign in to comment.