[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Multiple clients modifying one data. I need some technique for locking...

At 11:14 PM 2/26/01 +0100, dobos_s@IBCnet.hu wrote:
>There is an attribute in an entry called e.g "NextUniqID".
>There are multiple clients, which should take this value, increment it,
>then use it.
>Is there any technique to solve the situation, when these clients want to
>do this at the same time?
>(They shouldnt use the same UniqID. They should do the change after each

Use a single modify with a delete old then add new:

        dn: cn=entry
        changetype: modify
        delete: NextUniqID
        NextUniqID: 3
        add: NextUniqID
        NextUniqID: 4

LDAP/X.500 says this should occur as one atomic action.
This is best used with SINGLE-VALUED attributes.