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 2022/03/23 03:48:59 UTC

[iotdb] branch rel_new/0.13 created (now 9077b1d)

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

xuekaifeng pushed a change to branch rel_new/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 9077b1d  fix bug

This branch includes the following new commits:

     new 9077b1d  fix bug

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: fix bug

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

xuekaifeng pushed a commit to branch rel_new/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 9077b1dd0cd4a42f705495ab95568f180a4f0cd0
Author: 151250176 <15...@smail.nju.edu.cn>
AuthorDate: Wed Mar 23 11:46:50 2022 +0800

    fix bug
---
 .../apache/iotdb/db/engine/memtable/AlignedWritableMemChunk.java    | 6 +++---
 .../java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/memtable/AlignedWritableMemChunk.java b/server/src/main/java/org/apache/iotdb/db/engine/memtable/AlignedWritableMemChunk.java
index cef4c5d..c7ec62f 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/memtable/AlignedWritableMemChunk.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/memtable/AlignedWritableMemChunk.java
@@ -206,7 +206,7 @@ public class AlignedWritableMemChunk implements IWritableMemChunk {
   }
 
   @Override
-  public TVList getSortedTvListForQuery() {
+  public synchronized TVList getSortedTvListForQuery() {
     sortTVList();
     // increase reference count
     list.increaseReferenceCount();
@@ -214,7 +214,7 @@ public class AlignedWritableMemChunk implements IWritableMemChunk {
   }
 
   @Override
-  public TVList getSortedTvListForQuery(List<IMeasurementSchema> schemaList) {
+  public synchronized TVList getSortedTvListForQuery(List<IMeasurementSchema> schemaList) {
     sortTVList();
     // increase reference count
     list.increaseReferenceCount();
@@ -238,7 +238,7 @@ public class AlignedWritableMemChunk implements IWritableMemChunk {
   }
 
   @Override
-  public void sortTvListForFlush() {
+  public synchronized void sortTvListForFlush() {
     sortTVList();
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java b/server/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
index 3061c30..c46714f 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
@@ -94,6 +94,8 @@ public interface IWritableMemChunk {
    *
    * <p>the mechanism is just like copy on write
    *
+   * <p>This interface should be synchronized for concurrent with sortTvListForFlush
+   *
    * @return sorted tv list
    */
   TVList getSortedTvListForQuery();
@@ -103,6 +105,8 @@ public interface IWritableMemChunk {
    *
    * <p>the mechanism is just like copy on write
    *
+   * <p>This interface should be synchronized for concurrent with sortTvListForFlush
+   *
    * @return sorted tv list
    */
   TVList getSortedTvListForQuery(List<IMeasurementSchema> schemaList);
@@ -110,6 +114,8 @@ public interface IWritableMemChunk {
   /**
    * served for flush requests. The logic is just same as getSortedTVListForQuery, but without add
    * reference count
+   *
+   * <p>This interface should be synchronized for concurrent with getSortedTvListForQuery
    */
   void sortTvListForFlush();