[
https://issues.apache.org/jira/browse/OAK-11070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17877713#comment-17877713
]
Axel Hanikel commented on OAK-11070:
------------------------------------
Created PR: https://github.com/apache/jackrabbit-oak/pull/1676
> WriteAccessController: avoid race condition
> -------------------------------------------
>
> Key: OAK-11070
> URL: https://issues.apache.org/jira/browse/OAK-11070
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-azure
> Affects Versions: 1.68.0
> Reporter: Axel Hanikel
> Priority: Major
>
> From a comment by [~miroslav]:
> Race condition might be possible for two threads simultaneously accessing
> enableWriting and checkWritingAllowed methods:
> T1 enters checkWritingAllowed and finds isWritingAllowed is false.
> T2 enters enableWriting sets isWritingAllowed to true, acquires the lock and
> calls notifyAll().
> T1 misses notify signal and blocks at the beginning of the synchronised block.
> This is not critical since T2 will again call notifyAll after the next lease
> refresh call, but certainly, this could be improved.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)