This is an automated email from the ASF dual-hosted git repository. rong pushed a commit to branch cp14279 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 399a33412d06af30e118e55c592f6c578b9fbe58 Author: Steve Yurong Su <[email protected]> AuthorDate: Tue Dec 3 19:00:09 2024 +0800 Pipe: fix too many warn logs from findAllStuckPipes() (#14287) --- .../iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java index bfcf3bb5269..d730e22694e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java @@ -499,8 +499,11 @@ public class PipeDataNodeTaskAgent extends PipeTaskAgent { for (final PipeMeta pipeMeta : pipeMetaKeeper.getPipeMetaList()) { stuckPipes.add(pipeMeta); } - LOGGER.warn( - "All {} pipe(s) will be restarted because of forced restart policy.", stuckPipes.size()); + if (!stuckPipes.isEmpty()) { + LOGGER.warn( + "All {} pipe(s) will be restarted because of forced restart policy.", + stuckPipes.size()); + } return stuckPipes; } @@ -509,9 +512,11 @@ public class PipeDataNodeTaskAgent extends PipeTaskAgent { for (final PipeMeta pipeMeta : pipeMetaKeeper.getPipeMetaList()) { stuckPipes.add(pipeMeta); } - LOGGER.warn( - "All {} pipe(s) will be restarted because linked tsfiles' resource size exceeds memory limit.", - stuckPipes.size()); + if (!stuckPipes.isEmpty()) { + LOGGER.warn( + "All {} pipe(s) will be restarted because linked tsfiles' resource size exceeds memory limit.", + stuckPipes.size()); + } return stuckPipes; }
