mrhhsg opened a new pull request, #69502: URL: https://github.com/apache/doris/pull/69502
## Summary Cherry-picked from #69128 for branch-4.2. Automatic partition creation previously checked `max_auto_partition_num` only after creating partitions, so an over-limit request could fail after leaving new partitions behind. This change counts only missing partition names under the table read lock and rejects an over-limit batch before creation. It also rechecks capacity under the table write lock before publishing each automatic partition, while preserving the existing behavior of explicit partition DDL. ## Backport notes The branch-4.2 implementation uses its existing `AddPartitionClause` API and JUnit 4 test conventions. If concurrent requests exhaust capacity during a batch, partitions already published within the limit can remain. ## Tests - `./build.sh --fe` (passed; FE Checkstyle: 0 violations). - `./run-fe-ut.sh --run 'org.apache.doris.service.FrontendServiceImplTest#testCreatePartitionRangeLimitDoesNotLeavePartitions+testCreatePartitionListLimitCountsOnlyNewPartitions+testCreatePartitionLimitIsRecheckedAtPublication'` (3 passed, 0 failures, 0 errors). - `git diff origin/branch-4.2...HEAD --check` (passed). -- 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]
