CRZbulabula commented on code in PR #7287:
URL: https://github.com/apache/iotdb/pull/7287#discussion_r969126325
##########
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:
For SchameRegionGroup, the AtomicLong value is always 0. For
DataRegionGroup, the AtomicLong value represents the TimeSlotCount of the
specified TSeriesPartitionSlot. Currently I mingle the SchemaRegionGroup and
the DataRegionGroup into the RegionGroup, for which might cause some
misunderstands. I'll optimize these code in the future~
--
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]