[ 
https://issues.apache.org/jira/browse/KAFKA-20764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18102314#comment-18102314
 ] 

Matthias J. Sax commented on KAFKA-20764:
-----------------------------------------

It seems https://issues.apache.org/jira/browse/KAFKA-20724 is reporting the 
exact some issue, and also has the exact same fix... 
([https://github.com/apache/kafka/pull/22649)|https://github.com/apache/kafka/pull/22649]

Can you and [~zoro30102000] sync up on this – in the end we can only merge one 
of both PRs.

> StateUpdater moves tasks between collections unatomically which can lead to 
> duplicates
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-20764
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20764
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 3.8.0
>            Reporter: Nikita Shupletsov
>            Assignee: Nikita Shupletsov
>            Priority: Minor
>
> we update task collections without acquiring the lock here 
> [https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java#L679-L680]
>  and here 
> [https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java#L694-L695.]
> Which may cause "Task not found in the state updater. This indicates a bug." 
> due to duplicates in `tasks()`(the same task is present in two collections)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to