mychaow commented on a change in pull request #2724:
URL: https://github.com/apache/iotdb/pull/2724#discussion_r581511225



##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/log/manage/FilePartitionedSnapshotLogManager.java
##########
@@ -119,9 +119,20 @@ private void collectTsFilesAndFillTimeseriesSchemas() 
throws IOException {
     // 2.register the measurement
     for (Map.Entry<Integer, Collection<TimeseriesSchema>> entry : 
slotTimeseries.entrySet()) {
       int slotNum = entry.getKey();
-      FileSnapshot snapshot = slotSnapshots.computeIfAbsent(slotNum, s -> new 
FileSnapshot());
-      if (snapshot.getTimeseriesSchemas().isEmpty()) {
-        snapshot.setTimeseriesSchemas(entry.getValue());
+
+      boolean slotExistsInPartition = true;
+      if (dataGroupMember.getMetaGroupMember() != null) {

Review comment:
       same as following.

##########
File path: 
cluster/src/main/java/org/apache/iotdb/cluster/log/manage/PartitionedSnapshotLogManager.java
##########
@@ -99,10 +99,20 @@ void collectTimeseriesSchemas() {
               .calculateSlotByTime(
                   storageGroupName, 0, ((SlotPartitionTable) 
partitionTable).getTotalSlotNumbers());
 
-      Collection<TimeseriesSchema> schemas =
-          slotTimeseries.computeIfAbsent(slot, s -> new HashSet<>());
-      IoTDB.metaManager.collectTimeseriesSchema(sgNode, schemas);
-      logger.debug("{}: {} timeseries are snapshot in slot {}", getName(), 
schemas.size(), slot);
+      boolean slotExistsInPartition = true;
+      if (dataGroupMember.getMetaGroupMember() != null) {

Review comment:
       could move it to the line 94.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to