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 2021/08/18 05:11:26 UTC

[iotdb] branch rel/0.12 updated: PrimitiveArrayManager: reduce log of array deque size update & add limitUpdateThreshold update log (#3779)

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

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


The following commit(s) were added to refs/heads/rel/0.12 by this push:
     new 4324d18  PrimitiveArrayManager: reduce log of array deque size update & add limitUpdateThreshold update log (#3779)
4324d18 is described below

commit 4324d18b3de7093dc31931e86e86a77e21182372
Author: Steve Yurong Su (宇荣) <ro...@apache.org>
AuthorDate: Wed Aug 18 00:11:02 2021 -0500

    PrimitiveArrayManager: reduce log of array deque size update & add limitUpdateThreshold update log (#3779)
---
 .../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 76d2128..e595cfc 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
@@ -167,7 +167,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(),
@@ -176,11 +176,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);