szetszwo commented on code in PR #1017:
URL: https://github.com/apache/ratis/pull/1017#discussion_r1456665060


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/LogSegmentPath.java:
##########
@@ -58,9 +58,28 @@ public LogSegmentStartEnd getStartEnd() {
   }
 
   @Override
-  @SuppressFBWarnings("EQ_COMPARETO_USE_OBJECT_EQUALS")
   public int compareTo(LogSegmentPath that) {
-    return Comparator.comparing(LogSegmentPath::getStartEnd).compare(this, 
that);
+    return Comparator
+        .comparing(LogSegmentPath::getPath)

Review Comment:
   We should not compare paths since open segment and closed segment have 
different path name formats which may not follow the log index order.



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

Reply via email to