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



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java
##########
@@ -522,6 +523,12 @@ private void restoreChangelog(final ChangelogMetadata 
changelogMetadata) {
             // do not trigger restore listener if we are processing standby 
tasks
             if (changelogMetadata.stateManager.taskType() == 
Task.TaskType.ACTIVE) {
                 try {
+                    // first trigger the store's specific listener if its 
registered callback is also an lister,
+                    // then trigger the user registered global listener
+                    final StateRestoreCallback restoreCallback = 
changelogMetadata.storeMetadata.restoreCallback();
+                    if (restoreCallback instanceof StateRestoreListener)

Review comment:
       Nit: opening/closing `{ }` are missing

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java
##########
@@ -522,6 +523,12 @@ private void restoreChangelog(final ChangelogMetadata 
changelogMetadata) {
             // do not trigger restore listener if we are processing standby 
tasks
             if (changelogMetadata.stateManager.taskType() == 
Task.TaskType.ACTIVE) {
                 try {
+                    // first trigger the store's specific listener if its 
registered callback is also an lister,
+                    // then trigger the user registered global listener
+                    final StateRestoreCallback restoreCallback = 
changelogMetadata.storeMetadata.restoreCallback();

Review comment:
       Nit: we get `storeMetadata` above already (similar below) also the `if` 
is redundant  -- should we unify it?




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