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

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


The following commit(s) were added to refs/heads/rel/0.11 by this push:
     new 417ce5f  Fix File Not Found when serializing TsFileResources (#2161)
417ce5f is described below

commit 417ce5f309ff5e4e497292cd90be9e7b01132074
Author: SilverNarcissus <[email protected]>
AuthorDate: Wed Dec 2 19:50:56 2020 +0800

    Fix File Not Found when serializing TsFileResources (#2161)
    
    (cherry picked from commit 8e8384f43dcab8e45cd25723bcf292c2392bb5df)
---
 .../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 16b60d7..eef20dd 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);

Reply via email to