From 21db1ecff2078cdc61e23cca1fd618b5defb9eec Mon Sep 17 00:00:00 2001 From: zhannngchen <48427519+zhannngchen@users.noreply.github.com> Date: Fri, 19 Jan 2024 15:59:01 +0800 Subject: [PATCH] [fix](tablet meta) stale rowset is not loaded while BE start (#30077) --- be/src/olap/tablet_meta.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/be/src/olap/tablet_meta.cpp b/be/src/olap/tablet_meta.cpp index 3246e947d1..75ed4a909f 100644 --- a/be/src/olap/tablet_meta.cpp +++ b/be/src/olap/tablet_meta.cpp @@ -561,6 +561,13 @@ void TabletMeta::init_from_pb(const TabletMetaPB& tablet_meta_pb) { _rs_metas.push_back(std::move(rs_meta)); } + // init _stale_rs_metas + for (auto& it : tablet_meta_pb.stale_rs_metas()) { + RowsetMetaSharedPtr rs_meta(new RowsetMeta()); + rs_meta->init_from_pb(it); + _stale_rs_metas.push_back(std::move(rs_meta)); + } + // For mow table, delete bitmap of stale rowsets has not been persisted. // When be restart, query should not read the stale rowset, otherwise duplicate keys // will be read out. Therefore, we don't add them to _stale_rs_meta for mow table.