deardeng commented on code in PR #59848:
URL: https://github.com/apache/doris/pull/59848#discussion_r2688809932
##########
fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java:
##########
@@ -205,13 +205,18 @@ private static Pair<Integer, Integer>
getBucketsNum(DynamicPartitionProperty pro
}
public static List<Partition> getHistoricalPartitions(OlapTable table,
String nowPartitionName) {
- RangePartitionInfo info = (RangePartitionInfo)
(table.getPartitionInfo());
- List<Map.Entry<Long, PartitionItem>> idToItems = new
ArrayList<>(info.getIdToItem(false).entrySet());
- idToItems.sort(Comparator.comparing(o -> ((RangePartitionItem)
o.getValue()).getItems().upperEndpoint()));
- return idToItems.stream()
- .map(entry -> table.getPartition(entry.getKey()))
- .filter(partition -> partition != null &&
!partition.getName().equals(nowPartitionName))
- .collect(Collectors.toList());
+ table.readLock();
Review Comment:
Please confirm the automatic partitioning path and the lock location.
--
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]