Beyyes commented on code in PR #7287:
URL: https://github.com/apache/iotdb/pull/7287#discussion_r968454726
##########
confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java:
##########
@@ -441,7 +442,7 @@ public DataSet
getSchemaNodeManagementPartition(List<String> matchedStorageGroup
/** Get region information */
public DataSet getRegionInfoList(GetRegionInfoListPlan regionsInfoPlan) {
RegionInfoListResp regionResp = new RegionInfoListResp();
- List<TRegionInfo> regionInfoList = new ArrayList<>();
+ List<TRegionInfo> regionInfoList = new Vector<>();
Review Comment:
why using vector not ArrayList?
##########
confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/StorageGroupPartitionTable.java:
##########
@@ -207,17 +205,14 @@ public TConsensusGroupId getPrecededDataPartition(
*/
public void createSchemaPartition(SchemaPartitionTable
assignedSchemaPartition) {
// Cache assigned result
- Map<TConsensusGroupId, AtomicInteger> deltaMap =
+ // Map<TConsensusGroupId, Map<TSeriesPartitionSlot, deltaTimeSlotCount>>
+ Map<TConsensusGroupId, Map<TSeriesPartitionSlot, AtomicLong>>
groupDeltaMap =
schemaPartitionTable.createSchemaPartition(assignedSchemaPartition);
- // Add counter
- AtomicInteger total = new AtomicInteger(0);
- deltaMap.forEach(
- ((consensusGroupId, delta) -> {
- total.getAndAdd(delta.get());
- regionGroupMap.get(consensusGroupId).addCounter(delta.get());
- }));
- seriesPartitionSlotsCount.getAndAdd(total.get());
+ // Update counter
+ groupDeltaMap.forEach(
+ ((consensusGroupId, deltaMap) ->
Review Comment:
deltaMap, Map<TSeriesPartitionSlot, AtomicLong>, AtomicLong value is always
0, do we need execute the `AtomicLong` method?
--
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]