This is an automated email from the ASF dual-hosted git repository.
rong 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 d65543db668 Pipe: Reduce pipe logs generated by PipeEventCommitter
(#12616)
d65543db668 is described below
commit d65543db668febfe0292ce2d85978b675d1d907b
Author: Steve Yurong Su <[email protected]>
AuthorDate: Thu May 30 14:01:00 2024 +0800
Pipe: Reduce pipe logs generated by PipeEventCommitter (#12616)
---
.../commons/pipe/progress/PipeEventCommitter.java | 44 ++++++++++++++--------
1 file changed, 29 insertions(+), 15 deletions(-)
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java
index 2dba84a3877..04502441daf 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/progress/PipeEventCommitter.java
@@ -63,14 +63,26 @@ public class PipeEventCommitter {
public synchronized void commit(final EnrichedEvent event) {
commitQueue.offer(event);
- LOGGER.info(
- "COMMIT QUEUE OFFER: pipe name {}, creation time {}, region id {},
event commit id {}, last commit id {}, commit queue size {}",
- pipeName,
- creationTime,
- regionId,
- event.getCommitId(),
- lastCommitId.get(),
- commitQueue.size());
+ final int commitQueueSizeBeforeCommit = commitQueue.size();
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "COMMIT QUEUE OFFER: pipe name {}, creation time {}, region id {},
event commit id {}, last commit id {}, commit queue size {}",
+ pipeName,
+ creationTime,
+ regionId,
+ event.getCommitId(),
+ lastCommitId.get(),
+ commitQueueSizeBeforeCommit);
+ } else if (commitQueueSizeBeforeCommit != 0 && commitQueueSizeBeforeCommit
% 100 == 0) {
+ LOGGER.info(
+ "COMMIT QUEUE OFFER: pipe name {}, creation time {}, region id {},
event commit id {}, last commit id {}, commit queue size {}",
+ pipeName,
+ creationTime,
+ regionId,
+ event.getCommitId(),
+ lastCommitId.get(),
+ commitQueueSizeBeforeCommit);
+ }
while (!commitQueue.isEmpty()) {
final EnrichedEvent e = commitQueue.peek();
@@ -94,13 +106,15 @@ public class PipeEventCommitter {
lastCommitId.incrementAndGet();
commitQueue.poll();
- LOGGER.info(
- "COMMIT QUEUE POLL: pipe name {}, creation time {}, region id {},
last commit id {}, commit queue size after commit {}",
- pipeName,
- creationTime,
- regionId,
- lastCommitId.get(),
- commitQueue.size());
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug(
+ "COMMIT QUEUE POLL: pipe name {}, creation time {}, region id {},
last commit id {}, commit queue size after commit {}",
+ pipeName,
+ creationTime,
+ regionId,
+ lastCommitId.get(),
+ commitQueue.size());
+ }
}
}