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

Correct DataNode.getChildren() inconsistent behaviour.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.9, 3.5.1
    • 3.4.10, 3.5.3, 3.6.0
    • server
    • None

    Description

      DataNode.getChildren() API returns null and empty set if there are no children in it depending on when the API is called. DataNode.getChildren() API behavior should be changed and it should always return empty set if the node does not have any child

      DataNode.getChildren() API Current Behavior:

      1. returns null initially
        When DataNode is created and no children are added yet, DataNode.getChildren() returns null
      2. returns empty set after all the children are deleted:
        created a Node
        add a child
        delete the child
        DataNode.getChildren() returns empty set.

      After fix DataNode.getChildren() should return empty set in all the above cases.

      Attachments

        1. ZOOKEEPER-2680-01.patch
          3 kB
          Mohammad Arshad

        Issue Links

          Activity

            People

              arshad.mohammad Mohammad Arshad
              arshad.mohammad Mohammad Arshad
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: