From 6ffba1aaf4b6b6d26a333b7cd33f83732f74a04f Mon Sep 17 00:00:00 2001 From: Lchangliang <915311741@qq.com> Date: Wed, 10 Jan 2024 21:51:41 +0800 Subject: [PATCH] tmp --- be/src/olap/rowset/rowset_meta.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/be/src/olap/rowset/rowset_meta.cpp b/be/src/olap/rowset/rowset_meta.cpp index 2b649f7993dc76c..98b63c1066f1583 100644 --- a/be/src/olap/rowset/rowset_meta.cpp +++ b/be/src/olap/rowset/rowset_meta.cpp @@ -56,13 +56,7 @@ bool RowsetMeta::init(const RowsetMeta* rowset_meta) { bool RowsetMeta::init_from_pb(const RowsetMetaPB& rowset_meta_pb) { if (rowset_meta_pb.has_tablet_schema()) { - if (_handle) { - TabletSchemaCache::instance()->release(_handle); - } - auto pair = TabletSchemaCache::instance()->insert( - rowset_meta_pb.tablet_schema().SerializeAsString()); - _handle = pair.first; - _schema = pair.second; + set_tablet_schema(rowset_meta_pb.tablet_schema()); } // Release ownership of TabletSchemaPB from `rowset_meta_pb` and then set it back to `rowset_meta_pb`, // this won't break const semantics of `rowset_meta_pb`, because `rowset_meta_pb` is not changed @@ -150,6 +144,7 @@ bool RowsetMeta::_deserialize_from_pb(const std::string& value) { } if (rowset_meta_pb.has_tablet_schema()) { set_tablet_schema(rowset_meta_pb.tablet_schema()); + rowset_meta_pb.clear_tablet_schema(); } _rowset_meta_pb = rowset_meta_pb; return true;