You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/02/25 01:57:04 UTC
[incubator-iotdb] branch FileClosedDebug updated: PrintAllStackInfo
while calling close()
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch FileClosedDebug
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/FileClosedDebug by this push:
new b40f446 PrintAllStackInfo while calling close()
b40f446 is described below
commit b40f446acc7e667957d553b6da74af1d1647a663
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Feb 25 09:56:51 2020 +0800
PrintAllStackInfo while calling close()
---
.../org/apache/iotdb/tsfile/read/TsFileSequenceReader.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
index 3c1f0b4..0403607 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java
@@ -467,12 +467,20 @@ public class TsFileSequenceReader implements AutoCloseable {
if (resourceLogger.isInfoEnabled()) {
resourceLogger.info("{} reader is closed.", file);
}
+ Throwable ex = new Throwable();
+ StackTraceElement[] stackElements = ex.getStackTrace();
+ logger.error("{} reader is closed.", file);
+ if (stackElements != null) {
+ for (StackTraceElement stackElement : stackElements) {
+ logger.error("Class Name: {}, Function Name: {}, Line: {}", stackElement.getClassName(), stackElement.getMethodName(), stackElement.getLineNumber());
+ }
+ }
this.tsFileInput.close();
deviceMetadataMap = null;
}
public void close(String reason) throws IOException {
- resourceLogger.debug("{} reader is closed by {}", file, reason);
+ logger.error("{} reader is closed by {}", file, reason);
this.tsFileInput.close();
deviceMetadataMap = null;
}