You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yihao Zhao (Jira)" <ji...@apache.org> on 2021/10/16 09:48:00 UTC

[jira] [Issue Comment Deleted] (FLINK-24568) Configuration equals method does not properly check equality

     [ https://issues.apache.org/jira/browse/FLINK-24568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yihao Zhao updated FLINK-24568:
-------------------------------
    Comment: was deleted

(was: I can fix it !

)

> Configuration equals method does not properly check equality
> ------------------------------------------------------------
>
>                 Key: FLINK-24568
>                 URL: https://issues.apache.org/jira/browse/FLINK-24568
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Configuration
>            Reporter: Jessie Anderson
>            Priority: Minor
>
> Configuration's [equals|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L938] method only checks the configuration keys of the object the method is called on, meaning that the method will still return true if the object passed as the function argument contains additional config parameters. For example:
> {code:java}
> Configuration a = new Configuration();
> Configuration b = new Configuration();
> a.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.parse("1024mb"));
> b.set(TaskManagerOptions.TOTAL_PROCESS_MEMORY, MemorySize.parse("1024mb"));
> b.set(TaskManagerOptions.KILL_ON_OUT_OF_MEMORY, true);
> a.equals(b); // true
> b.equals(a); // false {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)