vamossagar12 commented on a change in pull request #11959:
URL: https://github.com/apache/kafka/pull/11959#discussion_r837169303



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -1047,9 +1048,9 @@ private static Metrics getMetrics(final StreamsConfig 
config, final Time time, f
                 // and then resize them later
                 streamThread = createAndAddStreamThread(0L, 0L, threadIdx);
                 final int numLiveThreads = getNumLiveStreamThreads();
-                resizeThreadCacheAndBufferMemory(numLiveThreads + 1);
+                resizeThreadCacheAndBufferMemory(numLiveThreads);
                 log.info("Adding StreamThread-{}, there are now {} threads 
with cache size/max buffer size values as {} per thread.",
-                        threadIdx, numLiveThreads + 1, 
getThreadCacheAndBufferMemoryString());
+                        threadIdx, numLiveThreads, 
getThreadCacheAndBufferMemoryString());

Review comment:
       @showuon , there are some tests for this here like : 
https://github.com/vamossagar12/kafka/blob/84c75ce44167e5e1bf8748a7ff9ba95309cd3d7e/streams/src/test/java/org/apache/kafka/streams/integration/AdjustStreamThreadCountTest.java#L373.
 which were added as part of original PR. Do you think they are enough?




-- 
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]


Reply via email to