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 <[email protected]> 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(); } }
