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

Correct DataNode.getChildren() inconsistent behaviour.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.9, 3.5.1
    • Fix Version/s: 3.4.10, 3.5.3, 3.6.0
    • Component/s: server
    • Labels:
      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

          Issue Links

            Activity

              People

              • Assignee:
                arshad.mohammad Mohammad Arshad
                Reporter:
                arshad.mohammad Mohammad Arshad
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: