deardeng commented on code in PR #54638:
URL: https://github.com/apache/doris/pull/54638#discussion_r2281422891


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1646,7 +1646,69 @@ public PartitionPersistInfo addPartition(Database db, 
String tableName, AddParti
         Preconditions.checkNotNull(olapTable);
         Preconditions.checkNotNull(indexIdToMeta);
 
+        // Guard to serialize concurrent creation of the same partition within 
the same table.
+        // We acquire or wait on a per-partition future to ensure only one 
creator proceeds to heavy work.

Review Comment:
   另外这一些逻辑能提出一个函数么?写上auto partition逻辑用的,addPartition函数太长了



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -1646,7 +1646,69 @@ public PartitionPersistInfo addPartition(Database db, 
String tableName, AddParti
         Preconditions.checkNotNull(olapTable);
         Preconditions.checkNotNull(indexIdToMeta);
 
+        // Guard to serialize concurrent creation of the same partition within 
the same table.
+        // We acquire or wait on a per-partition future to ensure only one 
creator proceeds to heavy work.
+        CompletableFuture<Void> ownerFuture = null;
+        while (true) {

Review Comment:
   要不搞个 重试次数?



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