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

Synchronization issues in QuorumPeer and FastLeader election

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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. patch-le-polish
          11 kB
          Flavio Paiva Junqueira
        2. patch-le-polish
          11 kB
          Patrick D. Hunt
        3. ZOOKEEPER-2.patch
          21 kB
          Flavio Paiva Junqueira

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment