Confd requires subscribe with priority. However, I would like to understand how Confd handles path match and priorities.
For example, I have below subscriptions:
path1, priority=1
path2, priority=2
…
path500, priority=500
path501=“/”, priority=501
path1..path500 are sub-paths of root “/”. In this case, if there is a modification in a path only matches the last one “/”, will it go through each priority check?
I’m asking this because in my case, I have a lot of different priorities, and in each priority, there may be more than one paths, and also, there are duplicated paths in different priorities - to handle the add and delete order issue(Order of configurations in a transaction).
I’m guessing when there is a path change, Confd does path check first. After all paths are checked, sort them based on priority, and send out notifications. This is one possible approach. In this way, the path comparison is one pass, which should be fast.
However, I’m not sure if, for some special reason, for a changed path, Confd go through all registered paths in all priorities, based on the priority, and compares them with the changed one. In this way, there will be more path comparison than the former approach when we have duplicate paths in different priorities.
Would anyone know the answer? Thanks!