This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 21db1ecff2078cdc61e23cca1fd618b5defb9eec
Author: zhannngchen <[email protected]>
AuthorDate: Fri Jan 19 15:59:01 2024 +0800

    [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 3246e947d13..75ed4a909f3 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to