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

xingtanzjr pushed a commit to branch test_wal_sync
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/test_wal_sync by this push:
     new 3727980317 add more logs
3727980317 is described below

commit 372798031733a281695cf0950ee2c19a20f27744
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Tue Jun 28 11:35:25 2022 +0800

    add more logs
---
 .../iotdb/consensus/multileader/logdispatcher/LogDispatcher.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
 
b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
index cf3c1ae7fc..c5b6036423 100644
--- 
a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
+++ 
b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
@@ -215,6 +215,11 @@ public class LogDispatcher {
       long endIndex;
       if (bufferedRequest.size() <= 
config.getReplication().getMaxRequestPerBatch()) {
         // Use drainTo instead of poll to reduce lock overhead
+        logger.info(
+            "{} : pendingRequest Size: {}, bufferedRequest size: {}",
+            impl.getThisNode().getGroupId(),
+            pendingRequest.size(),
+            bufferedRequest.size());
         pendingRequest.drainTo(
             bufferedRequest,
             config.getReplication().getMaxRequestPerBatch() - 
bufferedRequest.size());
@@ -223,7 +228,7 @@ public class LogDispatcher {
         // only execute this after a restart
         endIndex = constructBatchFromWAL(startIndex, maxIndex, logBatches);
         batch = new PendingBatch(startIndex, endIndex, logBatches);
-        logger.info("{} : accumulated a {} from wal", 
impl.getThisNode().getGroupId(), batch);
+        logger.info("Empty {} : accumulated a {} from wal", 
impl.getThisNode().getGroupId(), batch);
       } else {
         Iterator<IndexedConsensusRequest> iterator = 
bufferedRequest.iterator();
         IndexedConsensusRequest prev = iterator.next();
@@ -249,7 +254,7 @@ public class LogDispatcher {
             if (logBatches.size() == 
config.getReplication().getMaxRequestPerBatch()) {
               batch = new PendingBatch(startIndex, endIndex, logBatches);
               logger.info(
-                  "{} : accumulated a {} from queue and wal",
+                  "gap {} : accumulated a {} from queue and wal",
                   impl.getThisNode().getGroupId(),
                   batch);
               return batch;

Reply via email to