File tree Expand file tree Collapse file tree
confignode/src/main/java/org/apache/iotdb/confignode/manager/load/service
datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ public void stopEventService() {
115115 currentEventServiceFuture = null ;
116116 LOGGER .info ("Event service is stopped successfully." );
117117 }
118+ synchronized (this ) {
119+ previousNodeStatisticsMap .clear ();
120+ previousRegionGroupStatisticsMap .clear ();
121+ previousConsensusGroupStatisticsMap .clear ();
122+ }
118123 }
119124 }
120125
Original file line number Diff line number Diff line change @@ -523,13 +523,17 @@ private SchemaPartition parseSchemaPartitionTableResp(
523523
524524 Map <TSeriesPartitionSlot , TConsensusGroupId > orderedMap =
525525 new LinkedHashMap <>(entry1 .getValue ());
526- List <TConsensusGroupId > orderedGroupIds = new ArrayList <>(orderedMap .values ());
526+ List <TConsensusGroupId > orderedGroupIds =
527+ orderedMap .values ().stream ().distinct ().collect (Collectors .toList ());
527528 List <TRegionReplicaSet > regionReplicaSets =
528529 partitionCache .getRegionReplicaSet (orderedGroupIds );
530+ Map <TConsensusGroupId , TRegionReplicaSet > groupIdToReplicaSet = new HashMap <>();
531+ for (int index = 0 ; index < orderedGroupIds .size (); index ++) {
532+ groupIdToReplicaSet .put (orderedGroupIds .get (index ), regionReplicaSets .get (index ));
533+ }
529534
530- int index = 0 ;
531535 for (Map .Entry <TSeriesPartitionSlot , TConsensusGroupId > entry2 : orderedMap .entrySet ()) {
532- result1 .put (entry2 .getKey (), regionReplicaSets .get (index ++ ));
536+ result1 .put (entry2 .getKey (), groupIdToReplicaSet .get (entry2 . getValue () ));
533537 }
534538 }
535539 return new SchemaPartition (
You can’t perform that action at this time.
0 commit comments