Axel Hanikel created OAK-11070:
----------------------------------
Summary: 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
>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)