Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Lchangliang committed Jan 10, 2024
1 parent 2d0e53a commit 6ffba1a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions be/src/olap/rowset/rowset_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6ffba1a

Please sign in to comment.