You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/05/23 08:48:39 UTC

[iotdb] branch remove_session_debug_log created (now b59763e75e3)

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

haonan pushed a change to branch remove_session_debug_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at b59763e75e3 [IOTDB-5914] Remove redundant debug log in Session

This branch includes the following new commits:

     new b59763e75e3 [IOTDB-5914] Remove redundant debug log in Session

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.



[iotdb] 01/01: [IOTDB-5914] Remove redundant debug log in Session

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

haonan pushed a commit to branch remove_session_debug_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b59763e75e32b41b0f62767e4b9cd3d5b72fca1e
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue May 23 16:44:13 2023 +0800

    [IOTDB-5914] Remove redundant debug log in Session
---
 .../java/org/apache/iotdb/rpc/AutoResizingBuffer.java    |  3 ---
 .../src/main/java/org/apache/iotdb/session/Session.java  |  7 -------
 .../java/org/apache/iotdb/session/pool/SessionPool.java  | 16 ----------------
 3 files changed, 26 deletions(-)

diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/AutoResizingBuffer.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/AutoResizingBuffer.java
index 134c41bcadc..93a154e84b4 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/AutoResizingBuffer.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/AutoResizingBuffer.java
@@ -56,8 +56,6 @@ class AutoResizingBuffer {
       int newCapacity = Math.max(growCapacity, size);
       this.array = Arrays.copyOf(array, newCapacity);
       bufTooLargeCounter = RpcUtils.MAX_BUFFER_OVERSIZE_TIME;
-      logger.debug(
-          "{} expand from {} to {}, request: {}", this, currentCapacity, newCapacity, size);
     } else if (size > initialCapacity
         && currentCapacity * loadFactor > size
         && bufTooLargeCounter-- <= 0
@@ -66,7 +64,6 @@ class AutoResizingBuffer {
       array = Arrays.copyOf(array, size + (currentCapacity - size) / 2);
       bufTooLargeCounter = RpcUtils.MAX_BUFFER_OVERSIZE_TIME;
       lastShrinkTime = System.currentTimeMillis();
-      logger.debug("{} shrink from {} to {}", this, currentCapacity, size);
     }
   }
 
diff --git a/session/src/main/java/org/apache/iotdb/session/Session.java b/session/src/main/java/org/apache/iotdb/session/Session.java
index 1ed59f5d0d0..76f290e8448 100644
--- a/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -741,16 +741,10 @@ public class Session implements ISession {
   private SessionDataSet executeStatementMayRedirect(String sql, long timeoutInMs)
       throws StatementExecutionException, IoTDBConnectionException {
     try {
-      logger.debug("{} execute sql {}", defaultSessionConnection.getEndPoint(), sql);
       return defaultSessionConnection.executeQueryStatement(sql, timeoutInMs);
     } catch (RedirectException e) {
       handleQueryRedirection(e.getEndPoint());
       if (enableQueryRedirection) {
-        logger.debug(
-            "{} redirect query {} to {}",
-            defaultSessionConnection.getEndPoint(),
-            sql,
-            e.getEndPoint());
         // retry
         try {
           return defaultSessionConnection.executeQueryStatement(sql, queryTimeoutInMs);
@@ -795,7 +789,6 @@ public class Session implements ISession {
     } catch (RedirectException e) {
       handleQueryRedirection(e.getEndPoint());
       if (enableQueryRedirection) {
-        logger.debug("redirect query {} to {}", paths, e.getEndPoint());
         // retry
         try {
           return defaultSessionConnection.executeRawDataQuery(paths, startTime, endTime, timeOut);
diff --git a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
index 61a99e71f53..e51567c8be8 100644
--- a/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
+++ b/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java
@@ -415,9 +415,6 @@ public class SessionPool implements ISessionPool {
 
         // we have to wait for someone returns a session.
         try {
-          if (logger.isDebugEnabled()) {
-            logger.debug("no more sessions can be created, wait... queue.size={}", queue.size());
-          }
           this.wait(1000);
           long timeOut = Math.min(waitToGetSessionTimeoutInMs, 60_000);
           if (System.currentTimeMillis() - start > timeOut) {
@@ -454,13 +451,6 @@ public class SessionPool implements ISessionPool {
 
     if (shouldCreate) {
       // create a new one.
-      if (logger.isDebugEnabled()) {
-        if (nodeUrls == null) {
-          logger.debug("Create a new Session {}, {}, {}, {}", host, port, user, password);
-        } else {
-          logger.debug("Create a new redirect Session {}, {}, {}", nodeUrls, user, password);
-        }
-      }
 
       session = constructNewSession();
 
@@ -481,9 +471,6 @@ public class SessionPool implements ISessionPool {
           size--;
           // we do not need to notifyAll as any waited thread can continue to work after waked up.
           this.notify();
-          if (logger.isDebugEnabled()) {
-            logger.debug("open session failed, reduce the count and notify others...");
-          }
         }
         throw e;
       }
@@ -581,9 +568,6 @@ public class SessionPool implements ISessionPool {
         size--;
         // we do not need to notifyAll as any waited thread can continue to work after waked up.
         this.notify();
-        if (logger.isDebugEnabled()) {
-          logger.debug("open session failed, reduce the count and notify others...");
-        }
       }
     }
   }