You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2022/08/05 09:21:30 UTC

[iotdb] branch ml_0729_test_exp1_no_write updated (7e35c72ee0 -> c0fc852b1b)

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

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


    from 7e35c72ee0 enable write in follower
     new 815d540387 disable write in both side
     new c0fc852b1b spotless

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java | 4 ++--
 .../iotdb/consensus/multileader/logdispatcher/LogDispatcher.java  | 3 ++-
 .../iotdb/db/consensus/statemachine/DataRegionStateMachine.java   | 8 +++++---
 3 files changed, 9 insertions(+), 6 deletions(-)


[iotdb] 02/02: spotless

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c0fc852b1bcbf71a533a8398660088b796b7ec63
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Fri Aug 5 17:21:17 2022 +0800

    spotless
---
 .../iotdb/consensus/multileader/logdispatcher/LogDispatcher.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 956b9ba4b9..1ec4dbd490 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
@@ -112,8 +112,9 @@ public class LogDispatcher {
     threads.forEach(
         thread -> {
           logger.info(
-              "{}: Push a log to the queue, where the queue length is {}",
+              "{}->{}: Push a log to the queue, where the queue length is {}",
               impl.getThisNode().getGroupId(),
+              thread.getPeer().getEndpoint().getIp(),
               thread.getPendingRequest().size());
           long putToQueueStartTime = System.nanoTime();
           try {


[iotdb] 01/02: disable write in both side

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 815d54038735ee3530055c16346157c7ddfa2d37
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Fri Aug 5 17:18:25 2022 +0800

    disable write in both side
---
 .../apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java | 4 ++--
 .../iotdb/db/consensus/statemachine/DataRegionStateMachine.java   | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java
index 2460e43444..973a31272d 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java
@@ -125,8 +125,8 @@ public class MultiLeaderServerImpl {
               indexedConsensusRequest.getSearchIndex());
         }
         // TODO wal and memtable
-        TSStatus result = stateMachine.write(indexedConsensusRequest);
-        //        TSStatus result = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
+        //        TSStatus result = stateMachine.write(indexedConsensusRequest);
+        TSStatus result = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
         StepTracker.trace("stateMachineWrite", startTimeAfterLock, System.nanoTime());
         long offerStartTime = System.nanoTime();
         if (result.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
diff --git a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
index 8c63bcf173..e53c388163 100644
--- a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
+++ b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
@@ -185,10 +185,12 @@ public class DataRegionStateMachine extends BaseStateMachine {
       StepTracker.trace("followerWritePrepare", 25, prepareStartTime, System.nanoTime());
       long writeStartTime = System.nanoTime();
       if (insertNodeWrapper != null) {
-        for (InsertNode insertNode : insertNodeWrapper.getInsertNodes()) {
-          statuses.add(write(insertNode));
-        }
+        //        for (InsertNode insertNode : insertNodeWrapper.getInsertNodes()) {
+        //          statuses.add(write(insertNode));
+        //        }
         insertNodeWrapper.resultHandler.onComplete(new TSyncLogRes(statuses));
+      } else {
+        logger.error("insertNodeWrapper is null");
       }
       StepTracker.trace("followerWriteInsert", 25, writeStartTime, System.nanoTime());
     } catch (IllegalArgumentException e) {