You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2021/08/18 04:30:59 UTC

[iotdb] 01/01: PrimitiveArrayManager: reduce log of array deque size update & add limitUpdateThreshold update log

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

rong pushed a commit to branch arraypool-log-print
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 171ace2d6e7a61c6dd238abbfe0cff9089fb3706
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Wed Aug 18 12:30:16 2021 +0800

    PrimitiveArrayManager: reduce log of array deque size update & add limitUpdateThreshold update log
---
 .../java/org/apache/iotdb/db/rescon/PrimitiveArrayManager.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/rescon/PrimitiveArrayManager.java b/server/src/main/java/org/apache/iotdb/db/rescon/PrimitiveArrayManager.java
index 0fd0524..98bc8a1 100644
--- a/server/src/main/java/org/apache/iotdb/db/rescon/PrimitiveArrayManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/rescon/PrimitiveArrayManager.java
@@ -171,7 +171,7 @@ public class PrimitiveArrayManager {
       int newLimit = (int) (limitBase * ratios[i]);
       LIMITS[i] = newLimit;
 
-      if (LOGGER.isInfoEnabled()) {
+      if (LOGGER.isInfoEnabled() && oldLimit != newLimit) {
         LOGGER.info(
             "limit of {} array deque size updated: {} -> {}",
             TSDataType.deserialize((byte) i).name(),
@@ -180,11 +180,16 @@ public class PrimitiveArrayManager {
       }
     }
 
+    long oldLimitUpdateThreshold = limitUpdateThreshold;
     // limitUpdateThreshold = ∑(LIMITS[i])
     limitUpdateThreshold = 0;
     for (int limit : LIMITS) {
       limitUpdateThreshold += limit;
     }
+    LOGGER.info(
+        "limitUpdateThreshold of PrimitiveArrayManager updated: {} -> {}",
+        oldLimitUpdateThreshold,
+        limitUpdateThreshold);
 
     for (AtomicLong allocationRequestCount : ALLOCATION_REQUEST_COUNTS) {
       allocationRequestCount.set(0);