littleeleventhwolf commented on code in PR #26544:
URL: https://github.com/apache/flink/pull/26544#discussion_r2084218746


##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/RocksDBIncrementalCheckpointUtils.java:
##########
@@ -115,7 +115,6 @@ public double getOverlapFraction() {
         public int compareTo(@Nullable Score other) {
             return Comparator.nullsFirst(
                             Comparator.comparing(Score::getIntersectGroupRange)
-                                    
.thenComparing(Score::getIntersectGroupRange)

Review Comment:
   Thanks for the review suggestion. However, I have a different opinion:
   1. The `Score` class is a private inner class, and its `compareTo` method is 
only used internally.
   2. The correctness of this change is already covered by existing test: 
`RocksDBIncrementalCheckpointUtilsTest#testChooseTheBestStateHandleForInitial`
       - This test verifies the entire call chain including Score.compareTo()
       - The test results remain the same after removing the duplicate 
comparison
   3. To add a direct unit test for Score.compareTo(), we would need to:
       - Change Score's visibility to package-private. It seems unnecessary for 
such a trivial bug fix I believe the existing test coverage is sufficient for 
this change.
   
   What do you think?



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