Hi,
Actually i want to know whether we can acquire any kind of lock in openLDAP for entries.
Suppose we read some entry and use this for doing some calculation and at the same time someone else modify this entry, so i want to know that LDAP provides any kind of lock just like RDBMS.
In case of RDBMS we can acquire lock over any record so nobody can modify this until we release this lock.
Please tell me about the locking mechanism in OpenLDAP.
Thanks
Rakesh Yadav wrote:
Hi,
Actually i want to know whether we can acquire any kind of lock in openLDAP for entries.
Suppose we read some entry and use this for doing some calculation and at the same time someone else modify this entry, so i want to know that LDAP provides any kind of lock just like RDBMS.
In case of RDBMS we can acquire lock over any record so nobody can modify this until we release this lock.
Please tell me about the locking mechanism in OpenLDAP.
There are no specifications for protocol-level locking in either the X.500 standard nor the LDAP standard. Directories are not RDBMSs.
Your use case makes no sense. Once you've read the entry, you can do whatever calculations you want with that entry's data. Why does the entry in the directory need to be locked?
There are ways for applications to perform cooperative locking in LDAP, but so far it's not clear why you need it.
There are no specifications for protocol-level locking in either the X.500 standard nor the LDAP standard. Directories are not RDBMSs.
Your use case makes no sense. Once you've read the entry, you can do whatever calculations you want with that entry's data. Why does the entry in the directory need to be locked?
==>There are ways for applications to perform cooperative locking in LDAP, but so far it's not clear why you need it.
Actually i am using a DN
dn: guid=userId,dc=example,dc=in userId: 5000
It is having a single attribute userId. And i want to use this attribute for other entries of User for an Example:
dn: userName=rkyadav,dc=example,dc=in userName: rkyadav userId: 5000
when a request for adding a information of any user comes that time i read the value of userId and update this value by One means now it is having value of userId
dn: guid=userId,dc=example,dc=in userId: 5001
But between the process of reading and updating if some other request also reads the value of userId: 5000 then both users have the same value. But we don't want this.
so is there any mechanism through which we can hold the request,so it dose not get the value of userId between the process of reading and updating.
You told me in your reply: "There are ways for applications to perform cooperative locking in LDAP"
Please tell me about locking.
Rakesh Yadav wrote:
Actually i am using a DN
dn: guid=userId,dc=example,dc=in userId: 5000
It is having a single attribute userId. And i want to use this attribute for other entries of User for an Example:
dn: userName=rkyadav,dc=example,dc=in userName: rkyadav userId: 5000
when a request for adding a information of any user comes that time i read the value of userId and update this value by One means now it is having value of userId
dn: guid=userId,dc=example,dc=in userId: 5001
But between the process of reading and updating if some other request also reads the value of userId: 5000 then both users have the same value. But we don't want this.
so is there any mechanism through which we can hold the request,so it dose not get the value of userId between the process of reading and updating.
You told me in your reply: "There are ways for applications to perform cooperative locking in LDAP"
Please tell me about locking.
http://www.openldap.org/lists/openldap-software/200009/msg00559.html http://www.openldap.org/lists/openldap-general/200102/msg00070.html
There are dozens of similar posts in the archives; this topic has been covered for several years...
openldap-technical@openldap.org