gavinchou commented on code in PR #30128: URL: https://github.com/apache/doris/pull/30128#discussion_r1458485832
########## be/src/olap/rowset/rowset_meta.cpp: ########## @@ -102,18 +102,20 @@ void RowsetMeta::set_fs(io::FileSystemSPtr fs) { _fs = std::move(fs); } -void RowsetMeta::to_rowset_pb(RowsetMetaPB* rs_meta_pb) const { +void RowsetMeta::to_rowset_pb(RowsetMetaPB* rs_meta_pb, bool skip_schema) const { *rs_meta_pb = _rowset_meta_pb; - if (_schema) { - _schema->to_schema_pb(rs_meta_pb->mutable_tablet_schema()); + if (_schema) [[likely]] { + rs_meta_pb->set_schema_version(_schema->schema_version()); + if (!skip_schema) { + // For cloud, separate tablet schema from rowset meta to reduce persistent size. + _schema->to_schema_pb(rs_meta_pb->mutable_tablet_schema()); + } } } -RowsetMetaPB RowsetMeta::get_rowset_pb() { +RowsetMetaPB RowsetMeta::get_rowset_pb(bool skip_schema) const { RowsetMetaPB rowset_meta_pb = _rowset_meta_pb; Review Comment: seems unnecessary to assign init. ```suggestion RowsetMetaPB rowset_meta_pb; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org