You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/03/27 07:29:25 UTC

[iotdb] branch rel/1.1 updated: [To rel/1.1][IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9461)

This is an automated email from the ASF dual-hosted git repository.

zyk pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.1 by this push:
     new fc24ec8145 [To rel/1.1][IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9461)
fc24ec8145 is described below

commit fc24ec81459db08cac963cdb71fde0b5ca01631d
Author: Chen YZ <43...@users.noreply.github.com>
AuthorDate: Mon Mar 27 15:29:18 2023 +0800

    [To rel/1.1][IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9461)
---
 .../iotdb/db/metadata/mtree/store/disk/schemafile/SchemaFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/store/disk/schemafile/SchemaFile.java b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/store/disk/schemafile/SchemaFile.java
index 5d8445e367..afdfc5c1a1 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/store/disk/schemafile/SchemaFile.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/store/disk/schemafile/SchemaFile.java
@@ -468,7 +468,7 @@ public class SchemaFile implements ISchemaFile {
             getDirPath(sgName, schemaRegionId), MetadataConstant.SCHEMA_LOG_FILE_NAME);
     Files.deleteIfExists(schemaFile.toPath());
     Files.deleteIfExists(schemaLogFile.toPath());
-    Files.createLink(schemaFile.toPath(), snapshot.toPath());
+    Files.copy(snapshot.toPath(), schemaFile.toPath());
     return new SchemaFile(
         sgName,
         schemaRegionId,