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


##########
be/src/storage/tablet/tablet_meta.cpp:
##########
@@ -264,21 +264,11 @@ TabletMeta::TabletMeta(int64_t table_id, int64_t 
partition_id, int64_t tablet_id
     case TStorageFormat::V1:
         break;
     case TStorageFormat::V3:
-        schema_pb_for_data->set_is_external_segment_column_meta_used(true);
-        _schema->set_external_segment_meta_used_default(true);
-
-        schema_pb_for_data->set_integer_type_default_use_plain_encoding(true);
-        _schema->set_integer_type_default_use_plain_encoding(true);
-        schema_pb_for_data->set_binary_plain_encoding_default_impl(
-                BinaryPlainEncodingTypePB::BINARY_PLAIN_ENCODING_V2);
-        _schema->set_binary_plain_encoding_default_impl(
-                BinaryPlainEncodingTypePB::BINARY_PLAIN_ENCODING_V2);
-
+        
schema_pb_for_data->set_storage_format(TabletStorageFormatPB::TABLET_STORAGE_FORMAT_V3);

Review Comment:
   This creates a V3 tablet schema by writing only the new `storage_format` 
field. That is not compatible with older BEs that do not know field 36: they 
ignore it and fall back to the legacy flags 
(`is_external_segment_column_meta_used`, 
`integer_type_default_use_plain_encoding`, 
`binary_plain_encoding_default_impl`), which this path now leaves unset. In a 
rolling upgrade/rollback or any mixed-version consumption of persisted 
`TabletSchemaPB`, such a tablet is interpreted as V2 and new segments can be 
written/read with the wrong footer/encoding policy. The cloud FE path still 
writes both representations for backward compatibility, so the non-cloud BE 
create path should also keep setting the three legacy V3 flags when 
`storage_format == V3` while adding the new field.



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