showuon commented on a change in pull request #11959:
URL: https://github.com/apache/kafka/pull/11959#discussion_r837172358
##########
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:
That test is to test thread removal, right? We should have the similar
tests for thread addition. Otherwise, we should be able to catch this issue via
these tests.
--
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]