Skip to content

Commit

Permalink
[fix](be) be core dump caused by an invalid pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
felixwluo committed Aug 15, 2024
1 parent ab2d94f commit 33b2659
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions be/src/olap/rowset/segment_v2/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ Status Segment::load_index() {
}

Status Segment::_create_column_readers() {
std::unordered_map<uint32_t, uint32_t> _column_id_to_footer_ordinal;

for (uint32_t ordinal = 0; ordinal < _footer.columns().size(); ++ordinal) {
auto& column_pb = _footer.columns(ordinal);
_column_id_to_footer_ordinal.emplace(column_pb.unique_id(), ordinal);
Expand Down
5 changes: 0 additions & 5 deletions be/src/olap/rowset/segment_v2/segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ class Segment : public std::enable_shared_from_this<Segment> {
int64_t _meta_mem_usage;
SegmentFooterPB _footer;

// Map from column unique id to column ordinal in footer's ColumnMetaPB
// If we can't find unique id from it, it means this segment is created
// with an old schema.
std::unordered_map<uint32_t, uint32_t> _column_id_to_footer_ordinal;

// map column unique id ---> column reader
// ColumnReader for each column in TabletSchema. If ColumnReader is nullptr,
// This means that this segment has no data for that column, which may be added
Expand Down

0 comments on commit 33b2659

Please sign in to comment.