airborne12 commented on code in PR #66235:
URL: https://github.com/apache/doris/pull/66235#discussion_r3680200972


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PartitionInfo.java:
##########
@@ -455,6 +480,13 @@ public void resetPartitionIdForRestore(
             if (!isSinglePartitioned) {
                 idToItem.put(newPartId, origIdToItem.get(origPartId));
             }
+            if (origIdToInvertedIndexFileStorageFormat != null) {
+                TInvertedIndexFileStorageFormat invertedIndexFileStorageFormat 
=
+                        origIdToInvertedIndexFileStorageFormat.get(origPartId);
+                if (invertedIndexFileStorageFormat != null) {
+                    idToInvertedIndexFileStorageFormat.put(newPartId, 
invertedIndexFileStorageFormat);

Review Comment:
   Blocking: this remaps the partition-owned format in FE metadata, but 
`CloudRestoreJob.createReplicas()` still builds every restored Cloud tablet 
with `localTbl.getInvertedIndexFileStorageFormat()` and 
`localTbl.getBaseSchemaVersion()`. After restoring a mixed V2/V3 table, 
`PartitionInfo` can therefore say that a partition is V2 while its new 
`TabletSchema` is created from the current table-level V3 format/schema. Please 
pass the restored partition's resolved format and corresponding backup 
schema/version into `createTabletMetaBuilder()` so the physical tablets and 
partition metadata are restored consistently. This needs coverage for both 
full-table restore and partition-only restore with mixed V2/V3 partitions.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/doris/FeServiceClient.java:
##########
@@ -462,7 +463,7 @@ public void addPartitions(String catalogName, String 
dbName, String tableName, L
         long startTime = System.currentTimeMillis();
         TAddOrDropPartitionsResult result;
         try {
-            result = masterCallWithRetry(client -> 
client.addOrDropPartitions(request),
+            result = masterCallWithRetry(client -> 
client.addPartitionsForInsertOverwrite(request),

Review Comment:
   Blocking: this introduces a new Thrift method without a rolling-upgrade 
compatibility path. During an FE rolling upgrade, a new client can call an old 
FE that does not implement `addPartitionsForInsertOverwrite`, resulting in 
`TApplicationException.UNKNOWN_METHOD`. Retrying the same method cannot 
recover, so INSERT OVERWRITE through a remote Doris catalog will fail until 
every target FE has been upgraded.
   
   Please add explicit capability/version negotiation, or evolve the existing 
`addOrDropPartitions` request with an optional source-preserving flag and gate 
its use on server support. A blind fallback to the old method is not safe 
because it would create the temporary partition from the current table schema 
instead of preserving the source partition's physical schema. Please also add a 
new-client/old-server compatibility test.



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