dataroaring commented on code in PR #47300: URL: https://github.com/apache/doris/pull/47300#discussion_r1956190868
########## fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java: ########## @@ -873,8 +875,14 @@ && getTableProperty().getDynamicPartitionProperty().getBuckets() long newTabletId = env.getNextId(); Tablet newTablet = EnvFactory.getInstance().createTablet(newTabletId); idx.addTablet(newTablet, null /* tablet meta */, true /* is restore */); - // replicas + if (Config.isCloudMode()) { + long newReplicaId = Env.getCurrentEnv().getNextId(); + Replica replica = new CloudReplica(newReplicaId, null, ReplicaState.NORMAL, + visibleVersion, schemaHash, db.getId(), id, partition.getId(), idx.getId(), i); + newTablet.addReplica(replica, true /* is restore */); + continue; + } try { Review Comment: May be we can add two functions, createCloudReplicas and createReplicas to make code more clear. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org