You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "guozhangwang (via GitHub)" <gi...@apache.org> on 2023/01/31 19:26:44 UTC

[GitHub] [kafka] guozhangwang commented on a diff in pull request #12654: KAFKA-10575: Add onRestoreSuspsnded to StateRestoreListener

guozhangwang commented on code in PR #12654:
URL: https://github.com/apache/kafka/pull/12654#discussion_r1092383808


##########
streams/src/main/java/org/apache/kafka/streams/processor/StateRestoreListener.java:
##########
@@ -37,6 +37,9 @@
  * These two interfaces serve different restoration purposes and users should not try to implement both of them in a single
  * class during state store registration.
  *
+ * Also note that standby tasks restoration process are not monitored via this interface, since a standby task keep

Review Comment:
   Ack.



##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java:
##########
@@ -988,6 +988,18 @@ public void unregister(final Collection<TopicPartition> revokedChangelogs) {
             if (changelogMetadata != null) {
                 if (!changelogMetadata.state().equals(ChangelogState.REGISTERED)) {
                     revokedInitializedChangelogs.add(partition);
+
+                    // if the changelog is still in REGISTERED, it means it has not initialized and started
+                    // restoring yet, and hence the corresponding onRestoreStart was not called; in this case
+                    // we should not call onRestorePaused either

Review Comment:
   Ouch, Ack!



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

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

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