[ https://issues.apache.org/jira/browse/KAFKA-4175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493763#comment-15493763 ]
Guozhang Wang commented on KAFKA-4175: -------------------------------------- [~damianguy] Thanks for the finding. I think this was overlooked originally when we handle {{OverlappingFileLockException}}, that since {{FileChannel.tryLock}} is not bound to the thread, but is for the whole JVM, we thought returning null is sufficient. But it obviously is not the case. > Can't have StandbyTasks in KafkaStreams where NUM_STREAM_THREADS_CONFIG > 1 > --------------------------------------------------------------------------- > > Key: KAFKA-4175 > URL: https://issues.apache.org/jira/browse/KAFKA-4175 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 0.10.1.0 > Reporter: Damian Guy > Assignee: Guozhang Wang > Fix For: 0.10.1.0 > > > When we have StandbyTasks in a Kafka Streams app and we have > 1 threads per > instance we can run into: > {code} > Caused by: java.io.IOException: task [1_0] Failed to lock the state > directory: /private/tmp/kafka-streams-smoketest/2/SmokeTest/1_0 > {code} > This is because the StandbyTask has been assigned to the same KafkaStreams > instance as the active task. We need to either use a different base state > directory for the standby tasks or we need to change the assignment such that > they don't end up in the same instance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)