zhangyue19921010 opened a new pull request, #30107:
URL: https://github.com/apache/flink/pull/30107

   ## What is the purpose of the change
   
   Calling `MemorySize.ofMebiBytes(1L << 44)` produces a zero-byte size. Reject 
input when the corresponding byte count cannot fit in a nonnegative `long`. 
[FLINK-41667](https://issues.apache.org/jira/browse/FLINK-41667)
   
   ## Brief change log
   
   Check the MiB count before shifting it into bytes. Add a regression test at 
the upper limit and for positive and negative inputs that used to wrap to zero.
   
   ## Verifying this change
   
   The regression failed on master. All 34 tests in `flink-core-api` passed 
with the fix. A separate check compared 8,203 inputs against exact integer 
arithmetic and found zero mismatches. Repository-wide verification on the local 
host is limited by unavailable Docker and Maven artifacts.
   
   ## Does this pull request potentially affect one of the following parts
   
   Callers passing an out-of-range count now get an `IllegalArgumentException`. 
Representable inputs retain their exact byte count.
   
   ## Documentation
   
   The factory Javadoc describes its input range and exception.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to