You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/02 15:25:22 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #5767: Fix concurrent failure of testInsertMultiTabletPlanParallel

MarcosZyk commented on code in PR #5767:
URL: https://github.com/apache/iotdb/pull/5767#discussion_r862943380


##########
server/src/main/java/org/apache/iotdb/db/localconfignode/LocalConfigNode.java:
##########
@@ -539,7 +539,17 @@ public List<IStorageGroupMNode> getAllStorageGroupNodes() {
    */
   public SchemaRegionId getBelongedSchemaRegionId(PartialPath path) throws MetadataException {
     PartialPath storageGroup = storageGroupSchemaManager.getBelongedStorageGroup(path);
-    return schemaPartitionTable.getSchemaRegionId(storageGroup, path);
+    SchemaRegionId schemaRegionId = schemaPartitionTable.getSchemaRegionId(storageGroup, path);
+    if (schemaRegionId == null) {
+      throw new MetadataException(
+          String.format("Storage group %s has not been prepared well.", storageGroup));
+    }
+    ISchemaRegion schemaRegion = schemaEngine.getSchemaRegion(schemaRegionId);
+    if (schemaRegion == null) {
+      throw new MetadataException(
+          String.format("Storage group %s has not been prepared well.", storageGroup));

Review Comment:
   Fixed.



-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org