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


##########
fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java:
##########
@@ -1162,9 +1162,20 @@ protected void allReplicasCreated() {
                     if (reserveReplica) {
                         restoreReplicaAlloc = 
remotePartitionInfo.getReplicaAllocation(remotePartId);
                     }
+                    boolean isInMemory = 
remotePartitionInfo.getIsInMemory(remotePartId);
+                    if (Config.isCloudMode()) {

Review Comment:
   This cloud branch resets the restored partition's storage metadata, but it 
still trusts `restoreReplicaAlloc`, which may already have been taken from the 
source partition. The constructor forces `this.reserveReplica = false` in cloud 
mode, but it persists `PROP_RESERVE_REPLICA` using the original user value; 
after an FE restart `gsonPostProcess()` restores `reserveReplica` from that 
persisted property. If a cloud restore of selected partitions is submitted with 
`reserve_replica=true` and then restarts before/while metadata is prepared, the 
`if (reserveReplica)` just above this block uses 
`remotePartitionInfo.getReplicaAllocation(remotePartId)`, and the new cloud 
cleanup only resets `DataProperty`/`isInMemory`. The same pattern exists in 
`replayCheckAndPrepareMeta()` below.
   
   That leaves a distinct partition-level path where cloud restore can still 
persist source-cluster replica allocation, separate from the already-open 
TableProperty default-replica thread. Please either persist the effective 
cloud-normalized `reserveReplica` value or force `restoreReplicaAlloc` back to 
the cloud restore allocation in the cloud branches, and add 
replay/selected-partition coverage for `reserve_replica=true`.



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