zhuzhurk commented on a change in pull request #10079: [FLINK-14594] Fix matching logics of ResourceSpec/ResourceProfile/Resource considering double values URL: https://github.com/apache/flink/pull/10079#discussion_r346897094
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java ########## @@ -367,13 +348,22 @@ public int hashCode() { return result; } + /** + * Note: Avoid to use this method to do resource checking, + * unless a strict comparison is desired regarding the double values. + * Use {@link #isMatching(ResourceProfile)} or {@link #hasSameResources(ResourceProfile)} + * instead to compare resources ignoring smaller deltas of double values. Review comment: done by changing `Resource#equals` to compare BigDecimal values ignoring the scales. The commit to replace usages of `ResourceProfile#equal` is also dropped. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services