[sysrepo-devel] locking mechanism

Joan Landry JoLandry at advaoptical.com
Tue Oct 11 12:19:21 UTC 2016


In order to support an external database I would need a way to control when a user can edit the sysrepo candidate, and or be able to reject a commit to running.

Is this possible?

-----Original Message-----
From: Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) [mailto:lmacko at cisco.com] 
Sent: Tuesday, October 11, 2016 7:28 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: RE: locking mechanism

Hi,

The only provided notifications are tied to changes made in running data store.

Yes, you're right you can issue a commit request without explicitly calling lock. Internally the data store is automatically locked for the time of commit. However, if you send commit without prior locking it might failed because data store might be locked by other session.

Regards,
Lukas

> -----Original Message-----
> From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On 
> Behalf Of Joan Landry
> Sent: Tuesday, October 11, 2016 3:01 AM
> To: sysrepo-devel at sysrepo.org
> Subject: [sysrepo-devel] locking mechanism
> 
> I have an external database I need to keep synchronized with the 
> sysrep data store.
> 
> So I need a way to control as to when a  user can edit-config the 
> candidate  data store.
> 
> I also noticed that I can issue a commit to running without first 
> issuing a lock - should that be allowed?
> 
> Please let me know if there are any hooks available to control editing 
> of the data store.
> 
> Thanks for any info on this.
> _______________________________________________
> sysrepo-devel mailing list
> sysrepo-devel at sysrepo.org
> http://lists.sysrepo.org/listinfo/sysrepo-devel


More information about the sysrepo-devel mailing list