No, i am not getting the MOP_CREATED.
I expect MOP_MODIFIED…container is already present. but I only get VALUE_SET since values are changing.
I see that for maapi api’s you can set a flag to get Container updates (ITER_WANT_P_CONTAINER), but this flag doesn’t work for cdb_diff_iterate api’s
This is what i am looking.
maapi_diff_iterate() and cdb_diff_iterate() cover different use cases. maapi_diff_iterate() is typically used in conjunction with the notification API when we subscribe to CONFD_NOTIF_COMMIT_DIFF events. It can also be used inside validation callbacks.
After reading the subscription socket the cdb_diff_iterate() function can be used to iterate over the changes made in CDB data that matched the particular subscription point given by subid.
Why does your subscriber application need a MOP_MODIFIED for a presence container when the container presence haven’t changed?
I suppose if the leaf in the list gets changed we get MOP_CHANGED for list.
Similarly if the leaf in the container gets changed we expect MOP_CHANGED for container.
Reason is we are subscriber to /container. So when the update happens to the container, we want to construct our backend data-structure from this update. We just wait for MOP_CREATE/DEL/MODIFY to know the list/container got changed and then we issue the query to CDB to fetch the whole container/list for the updated data.
Without MOP_MODIFIED we are unable to handle that check. In container case, we only get MOP_VALUE_SET for the leaf value. This i feel is inconsistency in the update generation. Any way we still get it?