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

Xintong Song closed FLINK-14869.
--------------------------------
    Fix Version/s: 1.13.0
       Resolution: Fixed

Fixed via
* master (1.13): 72841d77802746dc12bffb5927ae0e43a681cb98

> Force an extended resource to be null if it's value is 0
> --------------------------------------------------------
>
>                 Key: FLINK-14869
>                 URL: https://issues.apache.org/jira/browse/FLINK-14869
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>    Affects Versions: 1.10.0
>            Reporter: Zhu Zhu
>            Assignee: Xintong Song
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.13.0
>
>
> {{Resource}} accepts value 0 at the moment because 0 {{CPUResource}} is used 
> in production to indicate no strict requirement for CPU cores. 
> However, keeping extended resources with value 0 is causing troubles. 
> e.g. There can be 2 ResourceSpecs, rs1 and rs2, with the same resources 
> except that rs1 contains a GPUResource with value 0 while rs2 does not 
> contains a specified GPUResource. In this case, rs1.equals(rs2)==false and 
> rs1.isLessOrEqualThan(rs2)==false, which is not correct.
> Accepting both 0 and null extended resources is also making things more 
> complex, since we need to consider it in all 
> comparisons(equals/lessThanOrEqual/isMatch) and aggregations(merge/subtract).
> To be simple, I'd propose to change it like this: in 
> ResourceSpec/ResourceProfile we only keep extended resource with positive 
> values. To be specific, if in the constructors of 
> ResourceSpec/ResourceProfile, a specified extended resource is found to be 0, 
> it must be dropped so that 0 resource would always be null.
> cc [~chesnay]



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

Reply via email to