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


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/TableProperty.java:
##########
@@ -678,10 +682,23 @@ public TableProperty 
buildInvertedIndexFileStorageFormat() {
     }
 
     public void modifyTableProperties(Map<String, String> modifyProperties) {
+        // Compatibility note: ModifyTablePropertyOperationLog persists only 
properties to set, not keys removed
+        // here. Keep its payload unchanged for this legacy repair. During a 
rolling FE upgrade, alter these
+        // properties on a table that already contains both legacy keys only 
after all FEs have been upgraded;
+        // otherwise old and new FEs may apply different effective replica 
settings.
+        removeConflictingDefaultReplicaProperty(modifyProperties);

Review Comment:
   [P1] Make the key removal replay-safe during rolling upgrades
   
   This removes the losing key only from the current FE's in-memory map, while 
the durable transitions (`ModifyTablePropertyOperationLog`, and similarly 
`ModifyPartitionInfo`) carry only the incoming allocation. Starting from 
historical `{default.replication_num=3, default.replication_allocation=1}`, an 
ALTER to allocation 2 makes a current FE use 2, but a pre-change FE applies 
`putAll`, retains numeric 3, and `PropertyAnalyzer` selects that value first. A 
failover can therefore silently revert the default and make new partitions 
inherit the wrong replica layout. The comment asks operators to wait until 
every FE is upgraded, but no validation or version gate enforces that 
restriction. This is distinct from the existing image-load and restore threads 
because it affects the new ALTER delta and replay. Please persist a transition 
old FEs interpret consistently, or reject the operation while incompatible FEs 
are present, audit the parallel replay paths, and cover mixed-version failover.



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