You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2016/07/19 23:01:20 UTC

[jira] [Resolved] (KAFKA-3812) State store locking is incorrect

     [ https://issues.apache.org/jira/browse/KAFKA-3812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guozhang Wang resolved KAFKA-3812.
----------------------------------
    Resolution: Fixed

Issue resolved by pull request 1628
[https://github.com/apache/kafka/pull/1628]

> State store locking is incorrect
> --------------------------------
>
>                 Key: KAFKA-3812
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3812
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.10.1.0
>            Reporter: Eno Thereska
>            Assignee: Damian Guy
>             Fix For: 0.10.1.0
>
>
> In {{ProcessorStateManager}} in the {{lockStateDirectory}} method, we close a channel if the lock is null. However, as described in https://docs.oracle.com/javase/7/docs/api/java/nio/channels/FileLock.html, "...closing a channel releases all locks held by the Java virtual machine on the underlying file regardless of whether the locks were acquired via that channel or via another channel open on the same file. It is strongly recommended that, within a program, a unique channel be used to acquire all locks on any given file.". Thus closing this channel sometimes leads to the other lock in {{ProcessorStateManager}}, called {{directoryLock}} to be released. 
> Problem is reproduced as part of the steps in KAFKA-3805, when two processes are using the same state directory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)