diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index 2fcedc2fd235d3..b301d2aa65bf4f 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -1959,6 +1959,8 @@ Status set_fuzzy_configs() { // if have set enable_fuzzy_mode=true in be.conf, will fuzzy those field and values fuzzy_field_and_value["disable_storage_page_cache"] = ((distribution(*generator) % 2) == 0) ? "true" : "false"; + fuzzy_field_and_value["disable_segment_cache"] = + ((distribution(*generator) % 2) == 0) ? "true" : "false"; fuzzy_field_and_value["enable_system_metrics"] = ((distribution(*generator) % 2) == 0) ? "true" : "false"; fuzzy_field_and_value["enable_set_in_bitmap_value"] = diff --git a/be/src/exec/rowid_fetcher.cpp b/be/src/exec/rowid_fetcher.cpp index b26ad63d71b34b..d6c47201dadf0a 100644 --- a/be/src/exec/rowid_fetcher.cpp +++ b/be/src/exec/rowid_fetcher.cpp @@ -442,9 +442,13 @@ Status RowIdStorageReader::read_by_rowids(const PMultiGetRequest& request, iterator_map[iterator_key].segment = segment; } segment = iterator_item.segment; - RETURN_IF_ERROR(segment->seek_and_read_by_rowid(full_read_schema, desc.slots()[x], - row_id, column, stats, - iterator_item.iterator)); + try { + RETURN_IF_ERROR(segment->seek_and_read_by_rowid(full_read_schema, desc.slots()[x], + row_id, column, stats, + iterator_item.iterator)); + } catch (const Exception& e) { + return Status::Error(e.code(), "Row id fetch failed because {}", e.what()); + } } } // serialize block if not empty diff --git a/be/src/olap/rowset/segment_v2/segment.cpp b/be/src/olap/rowset/segment_v2/segment.cpp index 86884d7adcec47..e29ec8908147fb 100644 --- a/be/src/olap/rowset/segment_v2/segment.cpp +++ b/be/src/olap/rowset/segment_v2/segment.cpp @@ -1125,6 +1125,10 @@ Status Segment::seek_and_read_by_rowid(const TabletSchema& schema, SlotDescripto vectorized::PathInDataPtr path = std::make_shared( schema.column_by_uid(slot->col_unique_id()).name_lower_case(), slot->column_paths()); + + // here need create column readers to make sure column reader is created before seek_and_read_by_rowid + // if segment cache miss, column reader will be created to make sure the variant column result not coredump + RETURN_IF_ERROR(_create_column_readers_once(&stats)); auto storage_type = get_data_type_of(ColumnIdentifier {.unique_id = slot->col_unique_id(), .path = path, .is_nullable = slot->is_nullable()},