You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2017/05/18 19:07:04 UTC

[jira] [Closed] (FLINK-6416) Potential divide by zero issue in InputGateMetrics#refreshAndGetAvg()

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

Chesnay Schepler closed FLINK-6416.
-----------------------------------
    Resolution: Fixed

1.3: 979228b3e2cac52c79c78855645a536d515befc9
1.4: c995ebd290b04c6426deff5a515ab0d0f1246ac7

> Potential divide by zero issue in InputGateMetrics#refreshAndGetAvg()
> ---------------------------------------------------------------------
>
>                 Key: FLINK-6416
>                 URL: https://issues.apache.org/jira/browse/FLINK-6416
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics, Network
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Ted Yu
>            Assignee: Chesnay Schepler
>            Priority: Minor
>             Fix For: 1.3.0, 1.4.0
>
>
> {code}
>     int count = 0;
>     for (InputChannel channel : inputGate.getInputChannels().values()) {
>       if (channel instanceof RemoteInputChannel) {
>         RemoteInputChannel rc = (RemoteInputChannel) channel;
>         int size = rc.unsynchronizedGetNumberOfQueuedBuffers();
>         total += size;
>         ++count;
>       }
>     }
>     return total / (float) count;
> {code}
> If count is zero at the end of the loop, the division would produce exception.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)