This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 048a108ec17 Pipe: Further reduced the repeating exception log &
Changed the default log reducer size to 16M & Did some minor fixes in Device
Schema Cache (#16417)
048a108ec17 is described below
commit 048a108ec1730f8fb203df449e53dee1cd43c956
Author: Caideyipi <[email protected]>
AuthorDate: Mon Sep 15 17:43:01 2025 +0800
Pipe: Further reduced the repeating exception log & Changed the default log
reducer size to 16M & Did some minor fixes in Device Schema Cache (#16417)
* fix
* fix
---
.../thrift/async/IoTDBDataRegionAsyncSink.java | 9 +++--
.../schema/dualkeycache/IDualKeyCacheUpdating.java | 45 ----------------------
.../fetcher/cache/TreeDeviceNormalSchema.java | 2 +-
.../cache/TreeDeviceSchemaCacheManager.java | 2 +-
.../apache/iotdb/commons/conf/CommonConfig.java | 2 +-
5 files changed, 9 insertions(+), 51 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java
index dc1f3d2d48e..6351f4551d7 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import
org.apache.iotdb.commons.client.async.AsyncPipeDataTransferServiceClient;
import org.apache.iotdb.commons.pipe.config.PipeConfig;
import org.apache.iotdb.commons.pipe.event.EnrichedEvent;
+import org.apache.iotdb.commons.pipe.resource.log.PipeLogger;
import org.apache.iotdb.commons.pipe.sink.protocol.IoTDBSink;
import org.apache.iotdb.db.pipe.event.common.deletion.PipeDeleteDataNodeEvent;
import org.apache.iotdb.db.pipe.event.common.heartbeat.PipeHeartbeatEvent;
@@ -514,11 +515,13 @@ public class IoTDBDataRegionAsyncSink extends IoTDBSink {
private void logOnClientException(
final AsyncPipeDataTransferServiceClient client, final Exception e) {
if (client == null) {
- LOGGER.warn(THRIFT_ERROR_FORMATTER_WITHOUT_ENDPOINT);
+ PipeLogger.log(LOGGER::warn, THRIFT_ERROR_FORMATTER_WITHOUT_ENDPOINT);
} else {
client.resetMethodStateIfStopped();
- LOGGER.warn(
- String.format(THRIFT_ERROR_FORMATTER_WITH_ENDPOINT, client.getIp(),
client.getPort()), e);
+ PipeLogger.log(
+ LOGGER::warn,
+ e,
+ String.format(THRIFT_ERROR_FORMATTER_WITH_ENDPOINT, client.getIp(),
client.getPort()));
}
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/schema/dualkeycache/IDualKeyCacheUpdating.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/schema/dualkeycache/IDualKeyCacheUpdating.java
deleted file mode 100644
index 7ebdd566c9e..00000000000
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/schema/dualkeycache/IDualKeyCacheUpdating.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.dualkeycache;
-
-/**
- * This interfaces defines the behaviour needed be implemented and executed
during cache value
- * traverse.
- *
- * @param <FK> The first key of target cache values
- * @param <SK> The second key of one target cache value
- * @param <V> The cache value
- */
-public interface IDualKeyCacheUpdating<FK, SK, V> {
-
- /** Return the first key of target cache values. */
- FK getFirstKey();
-
- /** Return the second key list of target cache values. */
- SK[] getSecondKeyList();
-
- /**
- * Compute each target cache value. The index is the second key's position
in second key list. The
- * value here can be updated.
- *
- * @return increasing memory usage
- */
- int updateValue(int index, V value);
-}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceNormalSchema.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceNormalSchema.java
index 62770868fe1..bca4dbdaa02 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceNormalSchema.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceNormalSchema.java
@@ -33,7 +33,7 @@ import java.util.concurrent.ConcurrentMap;
public class TreeDeviceNormalSchema implements IDeviceSchema {
static final int INSTANCE_SIZE =
- (int)
RamUsageEstimator.shallowSizeOfInstance(TreeDeviceTemplateSchema.class)
+ (int)
RamUsageEstimator.shallowSizeOfInstance(TreeDeviceNormalSchema.class)
+ (int)
RamUsageEstimator.shallowSizeOfInstance(ConcurrentHashMap.class);
private final String database;
private final boolean isAligned;
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java
index d17202b48cb..f38fbefa378 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java
@@ -374,7 +374,7 @@ public class TreeDeviceSchemaCacheManager {
/**
* Update the {@link TableDeviceLastCache} in writing for tree model. If a
measurement is with all
- * {@code null}s or is an id/attribute column, its {@link TimeValuePair[]}
shall be {@code null}.
+ * {@code null}s or is an id/attribute column, its {@link TimeValuePair}[]
shall be {@code null}.
* For correctness, this will put the {@link TableDeviceCacheEntry} lazily
and only update the
* existing {@link TableDeviceLastCache}s of measurements.
*
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
index 7110ad74c98..b0970370243 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java
@@ -298,7 +298,7 @@ public class CommonConfig {
private int pipeReceiverReqDecompressedMaxLengthInBytes = 1073741824; // 1GB
private boolean pipeReceiverLoadConversionEnabled = false;
private volatile long pipePeriodicalLogMinIntervalSeconds = 60;
- private volatile long pipeLoggerCacheMaxSizeInBytes = 10 * MB;
+ private volatile long pipeLoggerCacheMaxSizeInBytes = 16 * MB;
private volatile double pipeMetaReportMaxLogNumPerRound = 0.1;
private volatile int pipeMetaReportMaxLogIntervalRounds = 360;