Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data nodes sorted #2128

Merged
merged 38 commits into from
Feb 14, 2024
Merged

Data nodes sorted #2128

merged 38 commits into from
Feb 14, 2024

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    ca16868 View commit details
    Browse the repository at this point in the history
  2. tree data BUGFIX in lyd_insert_sibling()

    The lyd_insert_node() expecting first sibling.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    e7bd084 View commit details
    Browse the repository at this point in the history
  3. parser BUGFIX references to siblings

    ... when deleting metadata in the lyd_parse_set_data_flags().
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    38ea0fd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9eb9179 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    48a381e View commit details
    Browse the repository at this point in the history
  6. data tree BUGFIX duplication of metadata

    ... from different contexts.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    fcce169 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2bb0173 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    49824dd View commit details
    Browse the repository at this point in the history
  9. plugins types CHANGE compare function callback

    The function now has a new context parameter that may be needed when
    getting the canonical value. Type API version number has increased.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    3cc81e1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    86f23cf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d05e392 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    024e76e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3af39c0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    52175a8 View commit details
    Browse the repository at this point in the history
  15. plugins types FEATURE sort callback in empty

    ... implemented via new lyplg_type_sort_simple().
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    796b167 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bf08ad5 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    041e16a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    d23e267 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1a92571 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3489a50 View commit details
    Browse the repository at this point in the history
  21. plugins types REFACTOR for instanceid

    Simplification of sort and compare callback functions. The complexity
    of the comparison was needed in the old version of libyang.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    7ea1bd0 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    0e15ad2 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    96db3d6 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    de4f12d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f4e5ffc View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    c1d2fa4 View commit details
    Browse the repository at this point in the history
  27. tree data REFACTOR lyd_free functions

    The top parameter is removed.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    b0af023 View commit details
    Browse the repository at this point in the history
  28. libyang FEATURE sorting of data nodes

    1. Plugin type 'lyds_tree' is integrated. Used in metadata and it is
    internal, which is distinguished by the unset print callback.
    Internal metadata must not be printed.
    2. Leaf-list and list data instances are now automatically sorted.
    3. Both the explicit and implicit YANG statement 'ordered-by system'
    will cause the nodes to be ordered.
    4. The first instance of the list or leaf-list of node contain
    new metadata named 'lyds_tree'.
    5. Data nodes are sorted only if their data types have
    callback 'sort' set.
    6. Sorting can be turned off so far only by adding the 'ordered-by user'
    statement to the YANG model.
    7. If the sort fails for some reason, the node is still inserted
    as the last instance. A warning message informs about this situation.
    8. The time required for sorting should be relatively small thanks to
    the Red-black tree implementation.
    9. Memory requirements will now increase by 40 bytes per list/leaf-list
    data node, plus metadata structure overhead.
    10. New internal lyds_tree plugin type.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    23b7a7a View commit details
    Browse the repository at this point in the history
  29. lyds tree OPTIMIZE flag LYD_PARSE_ORDERED

    1. When inserting, the last parameter can also be used for nodes
    with lyds_tree
    2. The principle of lyds_tree is that it is created lazily.
    That is, if it is certain that the nodes are sorted, no metadata
    or lyds_tree is created.
    3. If it is necessary to modify the sorted nodes, the lyds_tree
    is created additionally. This means that inserting the first node
    can lead to a delay.
    4. The LYD_PARSE_ORDERED flag now has a positive performance effect
    because the lyds_tree is created lazily.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    32293fe View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a229693 View commit details
    Browse the repository at this point in the history
  31. tree data OPTIMIZE unlink-insert for lyds nodes

    Unlink and then insert is inefficient for sorted (lyds) list and
    leaf-list nodes. Also improved lyd_unlink_siblings().
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    0d90cdc View commit details
    Browse the repository at this point in the history
  32. lyds tree OPTIMIZE data can be unordered

    If the LYD_PARSE_ORDERED flag is set incorrectly, the data may be
    unordered, a warning will inform about this if the DEBUG variable
    is set. But as soon as the lyds tree is created later, the data will
    be sorted.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    4642a04 View commit details
    Browse the repository at this point in the history
  33. tree data BUGFIX added return value for unlink

    Added return value for functions lyd_unlink_siblings() and
    lyd_unlink_tree(), which causes ABI breaks.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    f15b1b8 View commit details
    Browse the repository at this point in the history
  34. tree data OPTIMIZE lyds in lyd_merge()

    There is no more freeing of memory and then allocation regarding
    regarding lyds data. Memory intended to be freed is temporarily
    not freed and instead waits for an opportunity to use it again.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    a180411 View commit details
    Browse the repository at this point in the history
  35. tree data OPTIMIZE added first_sibling parameter

    This change avoids unnecessary finding of the first sibling in case
    the parent node is not available.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    517273e View commit details
    Browse the repository at this point in the history
  36. tree data OPTIMIZE diff and lyd_insert_node()

    Function lyd_insert_node() has new options that ignore the ordering of
    data nodes. This is used in lyd_diff_add() because the diff as such
    does not need to be sorted.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    8880c3e View commit details
    Browse the repository at this point in the history
  37. tree data BUGFIX in ly_insert_node()

    Restored functionality regarding the sorting of opaq nodes and nodes
    with the LYD_EXT flag set.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    b5189da View commit details
    Browse the repository at this point in the history
  38. tree data OPTIMIZE of lyd_dup() for (leaf-)list

    Faster node insertion. There is no need to search for the 'anchor'
    for instances of the (leaf-)list, thus reducing the number of accesses
    to the hash table.
    lePici committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    e7ce2ab View commit details
    Browse the repository at this point in the history