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 11:11:45 UTC

[iotdb] branch ml_0729_test_exp1_no_write updated: fix a bug for current solution

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


The following commit(s) were added to refs/heads/ml_0729_test_exp1_no_write by this push:
     new 7c96f1e353 fix a bug for current solution
7c96f1e353 is described below

commit 7c96f1e353d331a0b9d94efad4e80177b0ae2386
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Fri Aug 5 19:11:33 2022 +0800

    fix a bug for current solution
---
 .../org/apache/iotdb/consensus/multileader/MultiLeaderServerImpl.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 791be89917..0d88fcdb1e 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
@@ -197,7 +197,7 @@ public class MultiLeaderServerImpl {
 
   public IndexedConsensusRequest buildIndexedConsensusRequestForLocalRequest(
       IConsensusRequest request) {
-    return new IndexedConsensusRequest(index.incrementAndGet(), Collections.singletonList(request));
+    return new IndexedConsensusRequest(index.get() + 1, Collections.singletonList(request));
   }
 
   public IndexedConsensusRequest buildIndexedConsensusRequestForRemoteRequest(