cadonna commented on a change in pull request #8902:
URL: https://github.com/apache/kafka/pull/8902#discussion_r444744436



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java
##########
@@ -578,4 +577,10 @@ private StateStoreMetadata findStore(final TopicPartition 
changelogPartition) {
 
         return found.isEmpty() ? null : found.get(0);
     }
+
+    @Override
+    public TopicPartition changelogTopicPartitionFor(final String storeName) {
+        final StateStoreMetadata storeMetadata = stores.get(storeName);
+        return storeMetadata == null ? null : storeMetadata.changelogPartition;

Review comment:
       IMO, it is fine to return `null` here and mention both possible reason 
for the `null` result in `logChange()`. What exception would you throw here? 
Retrieving a changelog partition of a not registered state store is not 
exceptional. However, retrieving a changelog partition of a not registered 
state store in a method that writes to that changelog partition -- i.e. 
`logChange()` -- is exceptional.




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