You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/05/13 01:29:10 UTC

[iotdb] branch graduate created (now 7ebb37572a)

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

jackietien pushed a change to branch graduate
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 7ebb37572a Add volatile for double-check fields

This branch includes the following new commits:

     new 7ebb37572a Add volatile for double-check fields

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Add volatile for double-check fields

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch graduate
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 7ebb37572ab3e17c513938a0f93bb08aaedcf706
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Fri May 13 09:28:19 2022 +0800

    Add volatile for double-check fields
---
 .../org/apache/iotdb/db/engine/storagegroup/TsFileResource.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 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 cd61cd0640..14f21df950 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
@@ -95,9 +95,9 @@ public class TsFileResource {
   /** time index type, V012FileTimeIndex = 0, deviceTimeIndex = 1, fileTimeIndex = 2 */
   private byte timeIndexType;
 
-  private ModificationFile modFile;
+  private volatile ModificationFile modFile;
 
-  private ModificationFile compactionModFile;
+  private volatile ModificationFile compactionModFile;
 
   protected volatile TsFileResourceStatus status = TsFileResourceStatus.UNCLOSED;
 
@@ -130,7 +130,7 @@ public class TsFileResource {
 
   private long ramSize;
 
-  private long tsFileSize = -1L;
+  private volatile long tsFileSize = -1L;
 
   private TsFileProcessor processor;