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

There is no need to clear & load the database across leader election

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      It is interesting to notice the piece of codes in QuorumPeer.java

      /* ZKDatabase is a top level member of quorumpeer

      • which will be used in all the zookeeperservers
      • instantiated later. Also, it is created once on
      • bootup and only thrown away in case of a truncate
      • message from the leader
        */
        private ZKDatabase zkDb;

      It is introduced by ZOOKEEPER-596. Now, we just drop the database every leader election.

      We can keep it safely with ZOOKEEPER-1549.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fanster.z Jacky007
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: