You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Session A calls get /status/firewall/stats. This is a slow operation which may take a few seconds. The results is collected by a background task.
Session B calls get /status/uptime. This is a very quick operation which could be handled immediately.
Originally the two xpaths are handled by the same subscription. I changed the code to two subscriptions, in my test, session B still has to wait until session A finishes the get.
The behavior is caused by the design of netopeer2:
The netconf request gets to netopeer, then function np2srv_rpc_cb is called. It calls sr_rpc_send_tree to invoke the rpc. This <get> request is then handled by the subscription thread. This subscription is locked. This prevents any new netconf requests.
Can np2srv_rpc_cb call np2srv_rpc_get_cb directly? I did a quick hack, both sessions can work concurrently with this change.
The text was updated successfully, but these errors were encountered:
I actually have this change in TODO but had not got to it yet. However, there is a requirement for NETCONF pipelining so I am not sure the change you made would not cause a deviation from the standard.
This is a follow question of sysrepo/sysrepo#3481.
For example, I have two netconf sessions.
Session A calls get /status/firewall/stats. This is a slow operation which may take a few seconds. The results is collected by a background task.
Session B calls get /status/uptime. This is a very quick operation which could be handled immediately.
Originally the two xpaths are handled by the same subscription. I changed the code to two subscriptions, in my test, session B still has to wait until session A finishes the get.
The behavior is caused by the design of netopeer2:
The netconf request gets to netopeer, then function
np2srv_rpc_cb
is called. It callssr_rpc_send_tree
to invoke the rpc. This<get>
request is then handled by the subscription thread. This subscription is locked. This prevents any new netconf requests.Can
np2srv_rpc_cb
callnp2srv_rpc_get_cb
directly? I did a quick hack, both sessions can work concurrently with this change.The text was updated successfully, but these errors were encountered: