[
https://issues.apache.org/jira/browse/FLINK-41667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuepeng Pan resolved FLINK-41667.
---------------------------------
Resolution: Fixed
Merged into master(2.5.0) via: 44e6c7fa6e5dc71eca619bd6f0fd057476289f1a
> MemorySize.ofMebiBytes can return zero when the byte count overflows
> --------------------------------------------------------------------
>
> Key: FLINK-41667
> URL: https://issues.apache.org/jira/browse/FLINK-41667
> Project: Flink
> Issue Type: Bug
> Components: API / Core
> Reporter: Yue Zhang
> Assignee: Yue Zhang
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> Call MemorySize.ofMebiBytes(1L << 44).getBytes(). The call returns 0 because
> the conversion shifts all set bits out of the long. Passing Long.MIN_VALUE
> also returns 0.
> The factory should reject negative input and input whose byte count cannot
> fit in a nonnegative long. Valid MiB counts should keep their exact byte
> value.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)