You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ea...@apache.org on 2019/05/31 01:34:04 UTC

[incubator-iotdb] branch fix_writelock_bug_when_recovery created (now 022a843)

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

east pushed a change to branch fix_writelock_bug_when_recovery
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 022a843  fix bug of write lock operation in merge() when IoTDB recover

This branch includes the following new commits:

     new 022a843  fix bug of write lock operation in merge() when IoTDB recover

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.



[incubator-iotdb] 01/01: fix bug of write lock operation in merge() when IoTDB recover

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

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

commit 022a843f9ad6503f29eb328eda237027828d9ec0
Author: mdf369 <95...@qq.com>
AuthorDate: Fri May 31 09:33:37 2019 +0800

    fix bug of write lock operation in merge() when IoTDB recover
---
 .../java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
index 209c1f1..9abd7b6 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
@@ -1044,6 +1044,7 @@ public class FileNodeProcessor extends Processor implements IStatistic {
    * Merge this storage group, merge the tsfile data with overflow data.
    */
   public void merge() throws FileNodeProcessorException {
+    writeLock();
     // close bufferwrite and overflow, prepare for merge
     LOGGER.info("The filenode processor {} begins to merge.", getProcessorName());
     prepareForMerge();
@@ -2045,7 +2046,6 @@ public class FileNodeProcessor extends Processor implements IStatistic {
       try {
         ZoneId zoneId = IoTDBDescriptor.getInstance().getConfig().getZoneID();
         long mergeStartTime = System.currentTimeMillis();
-        writeLock();
         merge();
         long mergeEndTime = System.currentTimeMillis();
         long intervalTime = mergeEndTime - mergeStartTime;