Does maapi_is_lock_set() reflect use of maapi_lock_partial() ?

60 views
Skip to first unread message

chriss

unread,
Oct 4, 2012, 5:45:44 PM10/4/12
to confd-us...@googlegroups.com
Does anyone know if maapi_is_lock_set() returns true if only a partial lock is set using maapi_lock_partial()? The documentation is not clear on this. I get the impression it only reflects result of maapi_lock().

Is there a way to test of a partial lock is taken on a given xpath? Thanks.

chriss

unread,
Oct 10, 2012, 12:14:07 PM10/10/12
to confd-us...@googlegroups.com
I got a response from Tail-F suport on this:

If someone currently holds a partial lock (and consequently nobody can have a global lock) then maapi_is_lock_set() will return 0.

If you have the ietf-netconf-monitoring model enabled, you can see what partial locks are in place on e.g. the "running" datastore by traversing the operational data list /netconf-state/datastores/datastore{running}/locks.

 The same information is also visible in the printouts done by "confd --state".

 And, of course, if you attempt to do a partial lock on a path, and this succeeds, you know that it was not locked. 

Reply all
Reply to author
Forward
0 new messages