github-actions[bot] commented on code in PR #63258:
URL: https://github.com/apache/doris/pull/63258#discussion_r4226535001


##########
be/src/storage/rowset/rowset_meta.cpp:
##########
@@ -300,6 +301,9 @@ bool RowsetMeta::_deserialize_from_pb(std::string_view 
value) {
                     _rowset_meta_pb.inverted_index_storage_format());
         }
         set_tablet_schema(schema_pb);
+        // The schema has been materialized into TabletSchemaCache by 
set_tablet_schema(). Drop the
+        // protobuf-owned copy from `_rowset_meta_pb` to avoid holding the 
large schema twice; passing
+        // nullptr intentionally deletes the current protobuf submessage.
         _rowset_meta_pb.set_allocated_tablet_schema(nullptr);

Review Comment:
   [P2] Rebuild the tablet schema before exporting rowset JSON. 
`_deserialize_from_pb()` now clears `_rowset_meta_pb.tablet_schema`, but 
`json_rowset_meta()` passes that same protobuf directly to 
`ProtoMessageToJson`. After `init(serialized_pb)` on a rowset with a schema, 
JSON export silently omits `tablet_schema`; loading that JSON cannot recover 
the schema. Serialize a temporary `get_rowset_pb()` (or reconstruct the schema 
here) before JSON conversion, and cover the binary-to-JSON round trip.



-- 
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