You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xu...@apache.org on 2020/12/02 08:36:39 UTC
[iotdb] 01/01: fix bug
This is an automated email from the ASF dual-hosted git repository.
xuekaifeng pushed a commit to branch fix_tsfile_resource_serialize_bug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 140aa4e0886f0842409fe06f78105193b02d7747
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Wed Dec 2 16:34:05 2020 +0800
fix bug
---
.../java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
index 58f37b3..2221ae4 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
@@ -265,7 +265,7 @@ public class TsFileResource {
Arrays.fill(times, defaultTime);
}
- public void serialize() throws IOException {
+ public synchronized void serialize() throws IOException {
try (OutputStream outputStream = fsFactory.getBufferedOutputStream(
file + RESOURCE_SUFFIX + TEMP_SUFFIX)) {
ReadWriteIOUtils.write(this.deviceToIndex.size(), outputStream);