You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/02/16 09:09:14 UTC
[incubator-iotdb] branch add_filenodeProcessorTest updated: tag a
potential deadlock in FileNodeProcessor
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch add_filenodeProcessorTest
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/add_filenodeProcessorTest by this push:
new 3e8827d tag a potential deadlock in FileNodeProcessor
3e8827d is described below
commit 3e8827d0bb9df4f3ab92777126a1704c077d8118
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Sat Feb 16 17:09:03 2019 +0800
tag a potential deadlock in FileNodeProcessor
---
.../iotdb/db/engine/filenode/FileNodeProcessor.java | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
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 6f48134..e223460 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
@@ -1838,23 +1838,26 @@ public class FileNodeProcessor extends Processor implements IStatistic {
@Override
public void run() {
try {
- ZoneId zoneId = IoTDBDescriptor.getInstance().getConfig().getZoneID();
long mergeStartTime = System.currentTimeMillis();
writeLock();
merge();
long mergeEndTime = System.currentTimeMillis();
long intervalTime = mergeEndTime - mergeStartTime;
- LOGGER.info(
- "The filenode processor {} merge start time is {}, "
- + "merge end time is {}, merge consumes {}ms.",
- getProcessorName(), ofInstant(Instant.ofEpochMilli(mergeStartTime),
- zoneId), ofInstant(Instant.ofEpochMilli(mergeEndTime),
- zoneId), intervalTime);
+ if (LOGGER.isInfoEnabled()) {
+ ZoneId zoneId = IoTDBDescriptor.getInstance().getConfig().getZoneID();
+ LOGGER.info(
+ "The filenode processor {} merge start time is {}, "
+ + "merge end time is {}, merge consumes {}ms.",
+ getProcessorName(), ofInstant(Instant.ofEpochMilli(mergeStartTime),
+ zoneId), ofInstant(Instant.ofEpochMilli(mergeEndTime),
+ zoneId), intervalTime);
+ }
} catch (FileNodeProcessorException e) {
LOGGER.error("The filenode processor {} encountered an error when merging.",
getProcessorName(), e);
throw new ErrorDebugException(e);
}
+ //FIXME no unlock?????
}
}
}
\ No newline at end of file