wcarlson5 commented on a change in pull request #9572:
URL: https://github.com/apache/kafka/pull/9572#discussion_r525427249



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -728,12 +729,8 @@ private KafkaStreams(final InternalTopologyBuilder 
internalTopologyBuilder,
                 "must subscribe to at least one source topic or global 
table.");
         }
 
-        long totalCacheSize = 
config.getLong(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG);
-        if (totalCacheSize < 0) {
-            totalCacheSize = 0;
-            log.warn("Negative cache size passed in. Reverting to cache size 
of 0 bytes.");
-        }
-        final long cacheSizePerThread = totalCacheSize / (numStreamThreads + 
(hasGlobalTopology ? 1 : 0));
+        totalCacheSize = 
config.getLong(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG);
+        final long cacheSizePerThread = totalCacheSize / (numStreamThreads + 
((globalTaskTopology != null) ? 1 : 0));

Review comment:
       It was in a separate method without access to `hasGlobalTopology`. I 
supposes if it stays we can move it back 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to