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:52 UTC
[iotdb] branch master updated: [IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9460)
This is an automated email from the ASF dual-hosted git repository.
zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new ff145c7cb4 [IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9460)
ff145c7cb4 is described below
commit ff145c7cb4e74952e1d724e21c0659455076f6f5
Author: Chen YZ <43...@users.noreply.github.com>
AuthorDate: Mon Mar 27 15:29:43 2023 +0800
[IOTDB-5730] Fix use a hard link when loading a SchemaFile snapshot (#9460)
---
.../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 f4a25a0625..4cee20b46d 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
@@ -477,7 +477,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,