You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/09/15 05:32:45 UTC

[GitHub] [incubator-doris] caiconghui commented on a change in pull request #6665: [Bug] Fix some bugs

caiconghui commented on a change in pull request #6665:
URL: https://github.com/apache/incubator-doris/pull/6665#discussion_r708850901



##########
File path: fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
##########
@@ -1102,4 +1088,14 @@ public String toString() {
         }
         return sb.toString();
     }
+
+    // Comparator to sort the replica with version count, asc
+    public static class VersionCountComparator implements Comparator<Replica> {
+        @Override
+        public int compare(Replica r1, Replica r2) {
+            long verCount1 = r1.getVersionCount() == -1 ? Integer.MAX_VALUE : r1.getVersionCount();
+            long verCount2 = r2.getVersionCount() == -1 ? Integer.MAX_VALUE : r2.getVersionCount();

Review comment:
       Integer.MAX_VALUE -> Long.MAX_VALUE




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org