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

comment does not match code logic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.5.1
    • 3.5.4, 3.6.0
    • server
    • None

    Description

      when i read the code below, the comment is put in an incorrect,place.
      " // in order to be committed, a proposal must be accepted by a quorum "
      should be place on top of :
      if (!p.hasAllQuorums())

      { return false; }

      ---------------------------------------------------------------------------------------
      3.5.1 Leader code
      // getting a quorum from all necessary configurations
      if (!p.hasAllQuorums()) { return false; }

      // commit proposals in order
      if (zxid != lastCommitted+1)

      { LOG.warn("Commiting zxid 0x" + Long.toHexString(zxid) + " from " + followerAddr + " not first!"); LOG.warn("First is " + (lastCommitted+1)); }

      // in order to be committed, a proposal must be accepted by a quorum

      outstandingProposals.remove(zxid);

      Attachments

        Issue Links

          Activity

            People

              panchaks Umesh Panchaksharaiah
              haitao-tony sunhaitao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: