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



##########
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:
       Done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to