kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-5967) Ineffective check of negative value in CompositeReadOnlyKeyValueStore#approximateNumEntries()
Date Sun, 01 Oct 2017 21:15:03 GMT

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

Matthias J. Sax updated KAFKA-5967:
-----------------------------------
    Fix Version/s: 0.11.0.2

> Ineffective check of negative value in CompositeReadOnlyKeyValueStore#approximateNumEntries()
> ---------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5967
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5967
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.11.0.1
>            Reporter: Ted Yu
>            Assignee: siva santhalingam
>            Priority: Minor
>              Labels: beginner, newbie
>             Fix For: 1.0.0, 0.11.0.2
>
>
> {code}
>         long total = 0;
>         for (ReadOnlyKeyValueStore<K, V> store : stores) {
>             total += store.approximateNumEntries();
>         }
>         return total < 0 ? Long.MAX_VALUE : total;
> {code}
> The check for negative value seems to account for wrapping.
> However, wrapping can happen within the for loop. So the check should be performed inside
the loop.



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

Mime
View raw message