flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6474) Potential loss of precision in 32 bit integer multiplication
Date Sun, 07 May 2017 19:22:04 GMT

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

ASF GitHub Bot commented on FLINK-6474:
---------------------------------------

GitHub user tedyu opened a pull request:

    https://github.com/apache/flink/pull/3839

    FLINK-6474 Potential loss of precision in 32 bit integer multiplication

    Cast numNetworkBuffers to long before multiplication.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tedyu/flink master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3839.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3839
    
----
commit 3f35aab20f4f0c3b11dbee3cfd5bbbe0249a9aa5
Author: tedyu <yuzhihong@gmail.com>
Date:   2017-05-07T19:20:27Z

    FLINK-6474 Potential loss of precision in 32 bit integer multiplication

----


> Potential loss of precision in 32 bit integer multiplication
> ------------------------------------------------------------
>
>                 Key: FLINK-6474
>                 URL: https://issues.apache.org/jira/browse/FLINK-6474
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> In TaskManagerServicesConfiguration#parseNetworkEnvironmentConfiguration
> {code}
>     if (!hasNewNetworkBufConf(configuration)) {
>       // map old config to new one:
>       networkBufMin = networkBufMax = numNetworkBuffers * pageSize;
> {code}
> networkBufMax is a long.
> However the multiplication is done in 32 bit integer, leading to potential loss of precision.



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

Mime
View raw message