Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1405

leader election recipe sample code - dispatchEvent invocations can get out of order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.3
    • None
    • recipes
    • None

    Description

      Since the process method is not synchronized in org.apache.zookeeper.recipes.election.LeaderElectionSupport, therefore there is a race condition where events coming in from the watch may overtake the events dispatched during the start method.

      A solution to ensure that events dispatched during the start method are handled before any watch-based events is to make the process method synchronized.

      Attachments

        Activity

          People

            Unassigned Unassigned
            robvarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: