You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/06/05 15:41:08 UTC

[GitHub] [incubator-iotdb] LebronAl opened a new pull request #1319: [Distrubuted] Peer tracker optimization

LebronAl opened a new pull request #1319:
URL: https://github.com/apache/incubator-iotdb/pull/1319


   during matchIndex checking,start checking from follower's lastLogIndex instead of leader's lastLogIndex to accelerate checking


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #1319: [Distrubuted] Peer tracker optimization

Posted by GitBox <gi...@apache.org>.
jt2594838 commented on a change in pull request #1319:
URL: https://github.com/apache/incubator-iotdb/pull/1319#discussion_r436427656



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/catchup/CatchUpTask.java
##########
@@ -55,28 +55,32 @@ public CatchUpTask(Node node, Peer peer, RaftMember raftMember) {
   }
 
   /**
-   *
    * @return true if the matched index exceed the memory log bound so a snapshot is necessary, or
    * false if the catch up can be done using memory logs.
    * @throws TException
    * @throws InterruptedException
    */
   boolean checkMatchIndex() throws TException, InterruptedException, LeaderUnknownException {
+    boolean isLogDebug = logger.isDebugEnabled();
+    long lo = -1, hi;

Review comment:
       I think it is fine to put multiple variables in a single line, but this will add Sonar code smells, so it is better to put them into separate lines.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] LebronAl commented on a change in pull request #1319: [Distrubuted] Peer tracker optimization

Posted by GitBox <gi...@apache.org>.
LebronAl commented on a change in pull request #1319:
URL: https://github.com/apache/incubator-iotdb/pull/1319#discussion_r436437645



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/catchup/CatchUpTask.java
##########
@@ -55,28 +55,32 @@ public CatchUpTask(Node node, Peer peer, RaftMember raftMember) {
   }
 
   /**
-   *
    * @return true if the matched index exceed the memory log bound so a snapshot is necessary, or
    * false if the catch up can be done using memory logs.
    * @throws TException
    * @throws InterruptedException
    */
   boolean checkMatchIndex() throws TException, InterruptedException, LeaderUnknownException {
+    boolean isLogDebug = logger.isDebugEnabled();
+    long lo = -1, hi;

Review comment:
       OK~




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] jt2594838 merged pull request #1319: [Distrubuted] Peer tracker optimization

Posted by GitBox <gi...@apache.org>.
jt2594838 merged pull request #1319:
URL: https://github.com/apache/incubator-iotdb/pull/1319


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-iotdb] jt2594838 commented on a change in pull request #1319: [Distrubuted] Peer tracker optimization

Posted by GitBox <gi...@apache.org>.
jt2594838 commented on a change in pull request #1319:
URL: https://github.com/apache/incubator-iotdb/pull/1319#discussion_r436427656



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/catchup/CatchUpTask.java
##########
@@ -55,28 +55,32 @@ public CatchUpTask(Node node, Peer peer, RaftMember raftMember) {
   }
 
   /**
-   *
    * @return true if the matched index exceed the memory log bound so a snapshot is necessary, or
    * false if the catch up can be done using memory logs.
    * @throws TException
    * @throws InterruptedException
    */
   boolean checkMatchIndex() throws TException, InterruptedException, LeaderUnknownException {
+    boolean isLogDebug = logger.isDebugEnabled();
+    long lo = -1, hi;

Review comment:
       I think it is fine to put multiple variables in a single line, but this will add Sonar code smells, so it is better to put them into separate lines.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org