OneSizeFitsQuorum commented on code in PR #6242: URL: https://github.com/apache/iotdb/pull/6242#discussion_r895306193
########## server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionUtils.java: ########## @@ -61,6 +62,10 @@ public static void deleteSchemaRegionFolder(String schemaRegionDirPath, Logger l String.format( "Failed to delete schema region folder %s", schemaRegionDir.getAbsolutePath())); } + final File storageGroupDir = schemaRegionDir.getParentFile(); Review Comment: same ########## server/src/main/java/org/apache/iotdb/db/engine/storagegroup/DataRegion.java: ########## @@ -1674,10 +1682,15 @@ public void syncDeleteDataFiles() { private void deleteAllSGFolders(List<String> folder) { for (String tsfilePath : folder) { - File storageGroupFolder = + File dataRegionDataFolder = fsFactory.getFile(tsfilePath, logicalStorageGroupName + File.separator + dataRegionId); - if (storageGroupFolder.exists()) { - org.apache.iotdb.commons.utils.FileUtils.deleteDirectory(storageGroupFolder); + if (dataRegionDataFolder.exists()) { Review Comment: Wrap these codes as a function? -- 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-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org