You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Bruno Cadonna (Jira)" <ji...@apache.org> on 2024/06/03 15:36:00 UTC
[jira] [Commented] (KAFKA-16836) Suspend reason of standby update listener is not correct
[ https://issues.apache.org/jira/browse/KAFKA-16836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851702#comment-17851702 ]
Bruno Cadonna commented on KAFKA-16836:
---------------------------------------
[~muralibasani] I do not think that this solves this issue.
{{transitionTaskState()}} is only there so that when the task state changes outside of the process state manager, the process state manager can be informed about it. Calling this method from inside the process state manager is dangerous because the task state kept in the process state manager would not be consistent anymore with the actual task state.
Additionally, here the issue is to pass to the standby update listener they correct suspend reason. So the correct suspend reason depends on why the standby task is suspended and not where.
> Suspend reason of standby update listener is not correct
> --------------------------------------------------------
>
> Key: KAFKA-16836
> URL: https://issues.apache.org/jira/browse/KAFKA-16836
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 3.7.0
> Reporter: Bruno Cadonna
> Priority: Major
>
> The standby update listener introduced in KIP-988 takes a suspend reason in {{standbyUpdateListener.onUpdateSuspended()}}. The reason is determined in {{StoreChangelogReader#unregister()}} based on the state of the standby task [1]. However, {{unregister()}} is called in the state updater and in the state updater the state of the standby is always {{RUNNING}} since the state updater never changes the state of a task. So the standby task will always have {{PROMOTED}} as suspend reason, even if the standby is migrated.
> [1] https://github.com/apache/kafka/blob/83110e2d425b49fed8ad5fdc6e93579423c73289/streams/src/main/java/org/apache/kafka/streams/processor/internals/StoreChangelogReader.java#L1064
--
This message was sent by Atlassian Jira
(v8.20.10#820010)