This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch refactor_bufferwrite
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/refactor_bufferwrite by this
push:
new 6a0c2ed make stop tsfileProcess more safe
6a0c2ed is described below
commit 6a0c2edd13dca737702d3d0aa80f6cb8d8affa3c
Author: xiangdong huang <[email protected]>
AuthorDate: Sun Apr 7 11:45:27 2019 +0800
make stop tsfileProcess more safe
---
.../org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java | 5 +++--
.../apache/iotdb/db/engine/tsfiledata/TsFileProcessorTest.java | 8 +++++---
2 files changed, 8 insertions(+), 5 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 27bdfd0..fb1250a 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
@@ -1665,8 +1665,9 @@ public class FileNodeProcessor extends Processor
implements IStatistic {
return false;
}
if (!newMultiPassLock.writeLock().tryLock()) {
- LOGGER.info("The filenode {} can't be closed, because it can't get
newMultiPassLock {}",
- getProcessorName(), newMultiPassLock);
+ LOGGER.warn(
+ "The filenode {} can't be closed, because it can't get
newMultiPassLock {}. The newMultiPassTokenSet is {}",
+ getProcessorName(), newMultiPassLock, newMultiPassTokenSet);
return false;
}
diff --git
a/iotdb/src/test/java/org/apache/iotdb/db/engine/tsfiledata/TsFileProcessorTest.java
b/iotdb/src/test/java/org/apache/iotdb/db/engine/tsfiledata/TsFileProcessorTest.java
index 6854c78..1464bcf 100644
---
a/iotdb/src/test/java/org/apache/iotdb/db/engine/tsfiledata/TsFileProcessorTest.java
+++
b/iotdb/src/test/java/org/apache/iotdb/db/engine/tsfiledata/TsFileProcessorTest.java
@@ -235,6 +235,11 @@ public class TsFileProcessorTest {
Assert.assertFalse(exception[0]);
Assert.assertFalse(exception[1]);
Assert.assertFalse(exception[2]);
+ synchronized (this) {
+ while (queryThread.isAlive()) {
+ this.wait(50);
+ }
+ }
QueryDataSet result = queryManager.query(qe, processor,
TEST_QUERY_CONTEXT);
int size =0;
while (result.hasNext()) {
@@ -243,7 +248,4 @@ public class TsFileProcessorTest {
}
//Assert.assertEquals(count[0], size);
}
-
-
-
}