You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by do...@apache.org on 2019/02/25 16:40:25 UTC

[incubator-iotdb] branch master updated: add debug log info for jdbc service (#68)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new eb662d0  add debug log info for jdbc service (#68)
eb662d0 is described below

commit eb662d06a726fa3354e1a237c7405fdbba748552
Author: XuYi <My...@users.noreply.github.com>
AuthorDate: Tue Feb 26 00:40:20 2019 +0800

    add debug log info for jdbc service (#68)
---
 .../org/apache/iotdb/db/service/JDBCService.java    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
index 4d40645..f75b62f 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java
@@ -68,6 +68,19 @@ public class JDBCService implements JDBCServiceMBean, IService {
 
   @Override
   public String getJDBCServiceStatus() {
+    // TODO debug log, will be deleted in production env
+    if(startLatch == null) {
+      LOGGER.debug("Start latch is null when getting status");
+    } else {
+      LOGGER.debug("Start latch is {} when getting status", startLatch.getCount());
+    }
+    if(stopLatch == null) {
+      LOGGER.debug("Stop latch is null when getting status");
+    } else {
+      LOGGER.debug("Stop latch is {} when getting status", stopLatch.getCount());
+    }	
+    // debug log, will be deleted in production env
+
     if(startLatch != null && startLatch.getCount() == 0) {
       return STATUS_UP;
     } else {
@@ -203,6 +216,14 @@ public class JDBCService implements JDBCServiceMBean, IService {
         LOGGER.error("{}: {} exit, because ", IoTDBConstant.GLOBAL_DB_NAME, getID().getName(), e);
       } finally {
         close();
+        // TODO debug log, will be deleted in production env
+        if(threadStopLatch == null) {
+        	LOGGER.debug("Stop Count Down latch is null");
+        } else {
+        	LOGGER.debug("Stop Count Down latch is {}", threadStopLatch.getCount());
+        }
+        // debug log, will be deleted in production env
+
         if (threadStopLatch != null && threadStopLatch.getCount() == 1) {
           threadStopLatch.countDown();
         }