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

The comment of the variable matchSyncs in class CommitProcessor has a mistake.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.10, 3.5.3
    • Fix Version/s: 3.5.4, 3.6.0, 3.4.12
    • Component/s: quorum
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The comment of the variable matchSyncs in class CommitProcessor says:

          /**
           * This flag indicates whether we need to wait for a response to come back from the
           * leader or we just let the sync operation flow through like a read. The flag will
           * be true if the CommitProcessor is in a Leader pipeline.
           */
          boolean matchSyncs;
      

      I search the source code and find that matchSyncs will be false if the CommitProcessor is in a Leader pipeline, and it will be true if the CommitProcessor is in a Follower pipeline.
      Therefore I think the comment should be modified to match the code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jiangjiafu Jiafu Jiang
                Reporter:
                jiangjiafu Jiafu Jiang
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: