xiaokang commented on code in PR #31483:
URL: https://github.com/apache/doris/pull/31483#discussion_r1505241131


##########
gensrc/proto/olap_file.proto:
##########
@@ -129,6 +129,7 @@ message RowsetMetaPB {
     // If enable_segments_file_size is false,
     // the segments_file_size maybe is empty or error
     optional bool enable_segments_file_size = 1004;
+    optional bool has_variant_type_in_schema = 1005;

Review Comment:
   Is it necessary to add this field, since it can be deduced from tablet 
schema?



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1008,8 +1009,15 @@ void 
MetaServiceImpl::commit_rowset(::google::protobuf::RpcController* controlle
         DCHECK(rowset_meta.tablet_schema().has_schema_version());
         DCHECK_GE(rowset_meta.tablet_schema().schema_version(), 0);
         
rowset_meta.set_schema_version(rowset_meta.tablet_schema().schema_version());
-        auto schema_key = meta_schema_key(
-                {instance_id, rowset_meta.index_id(), 
rowset_meta.schema_version()});
+        std::string schema_key;
+        if (rowset_meta.has_variant_type_in_schema()) {
+            // encodes schema in a seperate kv, since variant schema is 
volatile

Review Comment:
   It will use much more memory and disk to store meta for each rowset.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to