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 84a978cf79 add more logs
84a978cf79 is described below
commit 84a978cf79fec9889ac8e1afbc849b968a815cac
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Tue Jun 28 13:48:00 2022 +0800
add more logs
---
.../consensus/multileader/logdispatcher/LogDispatcher.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 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 c5b6036423..2db1c62d98 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
@@ -212,6 +212,7 @@ public class LogDispatcher {
List<TLogBatch> logBatches = new ArrayList<>();
long startIndex = syncStatus.getNextSendingIndex();
long maxIndex = impl.getController().getCurrentIndex() + 1;
+ logger.info("get batch. startIndex: {}, maxIndex: {}", startIndex,
maxIndex);
long endIndex;
if (bufferedRequest.size() <=
config.getReplication().getMaxRequestPerBatch()) {
// Use drainTo instead of poll to reduce lock overhead
@@ -292,6 +293,10 @@ public class LogDispatcher {
private long constructBatchFromWAL(
long currentIndex, long maxIndex, List<TLogBatch> logBatches) {
+ logger.info(
+ String.format(
+ "DataRegion[%s]->%s: currentIndex: %d, maxIndex: %d",
+ peer.getGroupId().getId(), peer.getEndpoint().ip, currentIndex,
maxIndex));
long startTime = System.nanoTime();
int count = 0;
try {
@@ -320,13 +325,8 @@ public class LogDispatcher {
double timeConsumed = (System.nanoTime() * 1.0 - startTime) / 1000_000;
logger.info(
String.format(
- "DataRegion[%s]->%s: construct batch time consumed: %.3f.
BatchCount: %d, currentIndex: %d, maxIndex: %d",
- peer.getGroupId().getId(),
- peer.getEndpoint().ip,
- timeConsumed,
- count,
- currentIndex,
- maxIndex));
+ "DataRegion[%s]->%s: construct batch time consumed: %.3f.
BatchCount: %d",
+ peer.getGroupId().getId(), peer.getEndpoint().ip,
timeConsumed, count));
}
}