Returning large lists in response to get_elem

when large number (20k) of list items are returned as a list_element in response to get_elem() via confd_data_reply_value. confd is repeatedly calling get_elem() in an infinite loop. This is happening only when large number of entries are returned. Is there an upper limit on the list size?

Can you give an example of YANG structure (excerpt) covering the items, and an example of paths (input params) of the callbacks that you see repeated?

It’s a bit unclear what you mean, as get_elem is designated to a leaf, not lists of elements…

(“old” behavior of leaf-lists - if this is the case, has been updated to work in list-like style quite some time ago - around ConfD 6.4 if i recall correctly)

container test {
    leaf model {
        tailf:callpoint extract_device_model;
        type string;
    }
}

I’m returning a leaf-list which has around 40k entries from callpoint extract_device_model, even after returning all 40k entries as part of
the callpoint, confd still calls get_elem() multiple times which results
in callpoint being called multiple times and the cli just gets stuck.

See the examples.confd/dp/generic_perf example and the ConfD-Demos/dp-performance at master · ConfD-Developer/ConfD-Demos · GitHub demo for data provider application performance guidance and a reference example.
Regarding leaf-lists, search for “CS_NODE_IS_LEAF_LIST” in ConfD-Demos/cdboper_dp.c at master · ConfD-Developer/ConfD-Demos · GitHub
Ps. your YANG model above contains a leaf, not a leaf-list.

Thanks for the response.

I have a requirement to return 70K elements as a leaf-list in response to get_elem. Is this possible? Is there any hard limit on how many elements a leaf-list can have?

Memory in your system is the only limit with ConfD.

Since you say the get_elem() callback is invoked for leaf-list I am guess you are either using a very old ConfD or the long time deprecated CONFD_DAEMON_FLAG_LEAF_LIST_AS_LEAF flag.

As you describe ConfD is calling get_elem() in an “infinite loop”, check your developer log (with log level trace) for clues.