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

Ephemeral nodes are never deleted if the cluster has a network partition while the zookeeper client is closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.5.3, 3.5.4, 3.6.0
    • None
    • quorum, server
    • None

    Description

      I read ZOOKEEPER-2355 and tried to reproduce it, but I found that this bug is not fixed in the fixed version. Ephemeral nodes are never deleted if the cluster has a network partition while the zookeeper client is closed.

      The steps to reproduce are as follows:

      1. Start a three-node zookeeper cluster and elect a leader.
      2. Create client zk1 to connect to the zookeeper cluster.
      3. Use zk1 to create a temporary node "/e1".
      4. Implement a network partition between the leader and any follower.
      5. Use close() to delete the zk1 client.
      6. Remove the previously imposed network partition.
      7. Create client zk2 to connect to any zookeeper server.
      8. Call zk2.exists(nodePath, false), and find that nodePath has not been deleted.
      9. Create a temporary node of the path "/e1" on zk2, and an exception is thrown: KeeperErrorCode = NodeExists for /e1

      I don't understand how this problem was fixed before. I tried two fixed versions 3.5.4 and 3.6.0, and the above reproduction path can still be triggered stably. The bug no longer appeared after I commented out the network partition related content.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zheyuanlin ZheyuanLin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: