dataroaring commented on code in PR #54494:
URL: https://github.com/apache/doris/pull/54494#discussion_r2262955426


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ReplacePartitionClause.java:
##########
@@ -130,6 +148,15 @@ public void analyze() throws AnalysisException {
         this.useTempPartitionName = 
PropertyAnalyzer.analyzeBooleanProp(properties,
                 PropertyAnalyzer.PROPERTIES_USE_TEMP_PARTITION_NAME, false);
 
+        // Parse expected versions for partition version checking
+        if (properties != null && 
properties.containsKey(PropertyAnalyzer.PROPERTIES_EXPECTED_VERSIONS)) {
+            String expectedVersionsStr = 
properties.get(PropertyAnalyzer.PROPERTIES_EXPECTED_VERSIONS);
+            parseExpectedVersions(expectedVersionsStr);
+            properties.remove(PropertyAnalyzer.PROPERTIES_EXPECTED_VERSIONS);
+            // Validate that all partitions in expected_versions match the 
partitions to be replaced
+            validateExpectedVersionsPartitions();

Review Comment:
   We should check it when hold lock, otherwise there is concurrent problem.



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