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

qiaojialin pushed a commit to branch feature_async_close_tsfile
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 8e17d61f5f0ce670b3261053fc5fd280033e7c30
Merge: 8d69b5e 1d099e7
Author: qiaojialin <[email protected]>
AuthorDate: Fri Jun 28 19:45:23 2019 +0800

    Merge remote-tracking branch 'origin/feature_async_close_tsfile' into 
feature_async_close_tsfile

 .../db/engine/filenodeV2/FileNodeProcessorV2.java  | 14 ++++++-----
 .../db/engine/filenodeV2/TsFileResourceV2.java     | 27 ++++++++++++----------
 .../filenodeV2/UnsealedTsFileProcessorV2.java      | 24 ++++++++++++-------
 .../engine/filenodeV2/FileNodeProcessorV2Test.java |  3 ++-
 .../filenodeV2/UnsealedTsFileProcessorV2Test.java  |  9 ++++----
 .../db/engine/memtable/ChunkBufferPoolTest.java    |  9 +++++---
 .../engine/memtable/MemTableFlushTaskV2Test.java   |  4 ++--
 .../iotdb/db/engine/memtable/MemTablePoolTest.java |  7 +++++-
 8 files changed, 60 insertions(+), 37 deletions(-)

diff --cc 
iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
index 7615bc0,0c64be3..2a2ced9
--- 
a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
+++ 
b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeProcessorV2.java
@@@ -387,19 -387,21 +388,21 @@@ public class FileNodeProcessorV2 
  
    private void writeLock() {
      long time = System.currentTimeMillis();
 -    lock.writeLock().lock();
 +    insertLock.writeLock().lock();
      time = System.currentTimeMillis() - time;
      if (time > 1000) {
-       LOGGER.info("storage group {} wait for write lock cost: {}", 
storageGroupName, time, new RuntimeException());
+       LOGGER.info("storage group {} wait for write lock cost: {}", 
storageGroupName, time,
+           new RuntimeException());
      }
      timerr.set(System.currentTimeMillis());
    }
  
    private void writeUnlock() {
 -    lock.writeLock().unlock();
 +    insertLock.writeLock().unlock();
      long time = System.currentTimeMillis() - timerr.get();
      if (time > 1000) {
-       LOGGER.info("storage group {} take lock for {}ms", storageGroupName, 
time, new RuntimeException());
+       LOGGER.info("storage group {} take lock for {}ms", storageGroupName, 
time,
+           new RuntimeException());
      }
    }
  
diff --cc 
iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
index b432f3e,c01c33c..ff50ce4
--- 
a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
+++ 
b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/UnsealedTsFileProcessorV2.java
@@@ -300,9 -304,8 +306,9 @@@ public class UnsealedTsFileProcessorV2 
      try {
        writer.makeMetadataVisible();
        flushingMemTables.remove(memTable);
 +      memTable.release();
        LOGGER.info("flush finished, remove a memtable from flushing list, "
-               + "flushing memtable list size: {}", flushingMemTables.size());
+           + "flushing memtable list size: {}", flushingMemTables.size());
      } finally {
        flushQueryLock.writeLock().unlock();
      }

Reply via email to