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

ASF GitHub Bot commented on KAFKA-6023:
---------------------------------------

GitHub user shivsantham opened a pull request:

    https://github.com/apache/kafka/pull/4041

    KAFKA-6023 ThreadCache#sizeBytes() should check overflow

        long sizeBytes() {
            long sizeInBytes = 0;
            for (final NamedCache namedCache : caches.values()) {
                sizeInBytes += namedCache.sizeInBytes();
            }
            return sizeInBytes;
        }
    The summation w.r.t. sizeInBytes may overflow.
    Check similar to what is done in size() should be performed.

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

    $ git pull https://github.com/shivsantham/kafkaImprovements kafka-6023

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

    https://github.com/apache/kafka/pull/4041.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 #4041
    
----
commit b3517bed4909da5d4bc5eae9a66daf681d2b4cb4
Author: siva santhalingam <siva.santhalin...@gmail.com>
Date:   2017-10-09T01:46:56Z

    KAFKA-6023 ThreadCache#sizeBytes() should check overflow

----


> ThreadCache#sizeBytes() should check overflow
> ---------------------------------------------
>
>                 Key: KAFKA-6023
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6023
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: siva santhalingam
>            Priority: Minor
>
> {code}
>     long sizeBytes() {
>         long sizeInBytes = 0;
>         for (final NamedCache namedCache : caches.values()) {
>             sizeInBytes += namedCache.sizeInBytes();
>         }
>         return sizeInBytes;
>     }
> {code}
> The summation w.r.t. sizeInBytes may overflow.
> Check similar to what is done in size() should be performed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to