You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ej...@apache.org on 2021/01/21 12:33:16 UTC

[iotdb] branch fix_merge_bug created (now f835d2b)

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

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


      at f835d2b  lock merge and query process

This branch includes the following new commits:

     new f835d2b  lock merge and query process

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: lock merge and query process

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

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

commit f835d2b6ce5571a34dbe90eaf9eb735752902a75
Author: EJTTianyu <16...@qq.com>
AuthorDate: Thu Jan 21 20:32:19 2021 +0800

    lock merge and query process
---
 .../org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index 2e88108..1298f1d 100755
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -1443,6 +1443,7 @@ public class StorageGroupProcessor {
   // TODO need a read lock, please consider the concurrency with flush manager threads.
   public QueryDataSource query(PartialPath deviceId, String measurementId, QueryContext context,
       QueryFileManager filePathsManager, Filter timeFilter) throws QueryProcessException {
+    tsFileManagement.writeLock();
     insertLock.readLock().lock();
     try {
       List<TsFileResource> seqResources = getFileResourceListForQuery(
@@ -1465,6 +1466,7 @@ public class StorageGroupProcessor {
       throw new QueryProcessException(e);
     } finally {
       insertLock.readLock().unlock();
+      tsFileManagement.writeUnlock();
     }
   }