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/12/14 06:03:57 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #8447: [IOTDB-5061] Add initialize state check when create snapshot

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


##########
server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java:
##########
@@ -437,6 +437,12 @@ public synchronized void deleteSchemaRegion() throws MetadataException {
   // currently, this method is only used for cluster-ratis mode
   @Override
   public synchronized boolean createSnapshot(File snapshotDir) {
+    if (!initialized) {
+      logger.warn(
+          "Failed to create snapshot of schemaRegion {}, because thi schemaRegion has not been initialized.",

Review Comment:
   Fixed.



##########
server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java:
##########
@@ -424,6 +424,12 @@ public synchronized void deleteSchemaRegion() throws MetadataException {
 
   @Override
   public boolean createSnapshot(File snapshotDir) {
+    if (!initialized) {
+      logger.warn(
+          "Failed to create snapshot of schemaRegion {}, because thi schemaRegion has not been initialized.",

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