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

Synchronization issues in QuorumPeer and FastLeader election

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • leaderElection
    • None
    • Reviewed

    Description

      There are a couple of cases of member variables that need to be marked volatile or surrounded in a synchronization block. A couple of examples are:

      • QuorumPeer state should be synchronous
      • currentVote in QuorumPeer is marked volatile, but when it's members are often accessed individually as if they were in an atomic unit. Such code should be changed to get a reference to the currentVote and they access members through that reference.
      • It looks like logicalClock in FastLeaderElection should be volatile. It should either be fixed or commented to explain why it doesn't need to be.

      Attachments

        1. ZOOKEEPER-2.patch
          21 kB
          Flavio Paiva Junqueira
        2. patch-le-polish
          11 kB
          Patrick D. Hunt
        3. patch-le-polish
          11 kB
          Flavio Paiva Junqueira

        Activity

          People

            fpj Flavio Paiva Junqueira
            breed Benjamin Reed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: