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 <[email protected]>
Date: 2017-10-09T01:46:56Z
KAFKA-6023 ThreadCache#sizeBytes() should check overflow
----
---