You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/05/07 19:22:04 UTC
[jira] [Commented] (FLINK-6474) Potential loss of precision in 32
bit integer multiplication
[ 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 <yu...@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)