You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yun Gao (Jira)" <ji...@apache.org> on 2022/07/05 07:13:00 UTC

[jira] [Commented] (FLINK-28240) NettyShuffleMetricFactory#RequestedMemoryUsageMetric#getValue may throw ArithmeticException when the total segments of NetworkBufferPool is 0

    [ https://issues.apache.org/jira/browse/FLINK-28240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17562407#comment-17562407 ] 

Yun Gao commented on FLINK-28240:
---------------------------------

Merged on master via c6b3a8aa25607fb62d51b92f11f72778e5d618b2

Merged on 1.15 via 95f4b6fc7fd4a713d8d6348d32a121498ffce1e2

> NettyShuffleMetricFactory#RequestedMemoryUsageMetric#getValue may throw ArithmeticException when the total segments of NetworkBufferPool is 0
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-28240
>                 URL: https://issues.apache.org/jira/browse/FLINK-28240
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Network
>    Affects Versions: 1.15.0
>            Reporter: Gen Luo
>            Priority: Major
>              Labels: pull-request-available
>
> In a single vertex job, the network memory can be set to 0 since the job doesn't need it, and in this case the totalNumberOfMemorySegments of the NetworkBufferPool will also be 0.
> While the NettyShuffleMetricFactory#RequestedMemoryUsageMetric#getValue uses the totalNumberOfMemorySegments of NetworkBufferPool as divisor without validating, so an ArithmeticException will be thrown when the totalNumberOfMemorySegments is 0.
> Since 0 network memory is in fact valid for a single vertex job, I suppose the RequestedMemoryUsageMetric#getValue should check if the devisor is 0, and return 0 as the usage directly in such cases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)