mjsax commented on a change in pull request #8847:
URL: https://github.com/apache/kafka/pull/8847#discussion_r438481932



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
##########
@@ -680,8 +680,11 @@ private void validateGlobalStoreArguments(final String 
sourceName,
         if (nodeFactories.containsKey(processorName)) {
             throw new TopologyException("Processor " + processorName + " is 
already added.");
         }
-        if (stateFactories.containsKey(storeName) || 
globalStateBuilders.containsKey(storeName)) {
-            throw new TopologyException("StateStore " + storeName + " is 
already added.");
+        if (stateFactories.containsKey(storeName)) {
+            throw new TopologyException("A different StateStore has already 
been added with the name " + storeName);
+        }
+        if (globalStateBuilders.containsKey(storeName)) {
+            throw new TopologyException("A different GlobalStateStore has 
already been added with the name " + storeName);
         }

Review comment:
       Minor improvement for the error message




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