Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-11070

WriteAccessController: avoid race condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.68.0
    • 1.70.0
    • segment-azure
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ahanikel Axel Hanikel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: