Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-6998

Backport OPENDJ-6377: Replication replay: issues with ReplaySynchronizer

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5.0, 6.0.0, 5.5.0, 7.0.0
    • Fix Version/s: 5.5.3
    • Component/s: replication
    • Labels:
    • Story Points:
      3

      Description

      During the code review for OPENDJ-6325, a few problems became apparent with the ReplaySynchronizer:

      • In UpdateReplayThreadPool.ReplayThread.run(), when the thread exits the loop, because of shutdown, ReplaySynchronizer.notifyAllReplaysDone() is never called while it looks like it should.
        • Risk: Replica listener threads remain blocked - will prevent the server from stopping
      • In that case, this will unlock the replica listener thread, which will end up calling UpdateReplayThreadPool.offer(), which will throw a IndexOutOfBoundsException because updateQueues has been cleared
      • Another issue with UpdateReplayThreadPool.ReplaySynchronizer.waitForAllReplaysDone() is the case of spurious wake-ups: when Semaphore.acquire(int) throws InterruptedException (because of spurious wake-up) it will incorrectly execute the following code in theĀ  finally block:stopTheWorld = false;

      There may be some other concurrency issue as well.
      This issue can be considered to be fixed when all identified concurreny issues are addressed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cjr Chris Ridd
                Reporter:
                cjr Chris Ridd
                Dev Assignee:
                Nicolas Capponi
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: