You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by er...@apache.org on 2022/06/10 06:23:59 UTC

[iotdb] branch master updated: [ISSUE-5885] Synchronize this method to match the synchronization on "setModFile" (#6197)

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

ericpai 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 b1c33910c1 [ISSUE-5885] Synchronize this method to match the synchronization on "setModFile" (#6197)
b1c33910c1 is described below

commit b1c33910c17c4336118497ee87387bc098bc09fe
Author: dafei1288 <da...@sina.com>
AuthorDate: Fri Jun 10 14:23:52 2022 +0800

    [ISSUE-5885] Synchronize this method to match the synchronization on "setModFile" (#6197)
---
 .../org/apache/iotdb/db/engine/storagegroup/TsFileResource.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 e625054743..715756cd9a 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
@@ -848,8 +848,10 @@ public class TsFileResource {
     return newResource;
   }
 
-  public synchronized void setModFile(ModificationFile modFile) {
-    this.modFile = modFile;
+  public void setModFile(ModificationFile modFile) {
+    synchronized (this) {
+      this.modFile = modFile;
+    }
   }
 
   /** @return resource map size */