Yue Zhang created FLINK-41667:
---------------------------------
Summary: 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
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)