muralibasani commented on code in PR #22458:
URL: https://github.com/apache/kafka/pull/22458#discussion_r3351702386
##########
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java:
##########
@@ -1324,8 +1334,19 @@ private long cacheSizePerThread(final int
numStreamThreads) {
return totalCacheSize / (numStreamThreads +
(topologyMetadata.hasGlobalTopology() ? 1 : 0));
}
- private void resizeThreadCache(final long cacheSizePerThread) {
- processStreamThread(thread -> thread.resizeCache(cacheSizePerThread));
+ // Pass through -1L unchanged so StreamThread can tell the bytes guard is
disabled.
+ private long bufferSizePerThread(final int numStreamThreads) {
+ if (inputBufferMaxBytes == -1L) {
+ return -1L;
+ }
+ if (numStreamThreads == 0) {
+ return inputBufferMaxBytes;
+ }
+ return inputBufferMaxBytes / numStreamThreads;
Review Comment:
split the bytes evenly across the threads
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]