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



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStore.java
##########
@@ -103,8 +104,12 @@ public void init(final ProcessorContext context,
 
     @SuppressWarnings("unchecked")
     void initStoreSerde(final ProcessorContext context) {
+        final String storeName = name();
+        final String changelogTopic = 
ProcessorContextUtils.changelogFor(context, storeName);
         serdes = new StateSerdes<>(
-            ProcessorStateManager.storeChangelogTopic(context.applicationId(), 
name()),
+             changelogTopic != null ?
+                changelogTopic :
+                
ProcessorStateManager.storeChangelogTopic(context.applicationId(), storeName),

Review comment:
       Ah thanks. I missed this case.
   
   However, should we move both `null` checks into 
`ProcessorContextUtils.changelogFor()` for this case? It seem, we do the same 
"outer" `null`-check each time we call the method, so why not do it at a single 
place in the code?




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