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

RE: compare uidNumber in LDAP



> value pretty close to simultaneously.  Any known solutions to the
> programmatic incrementing problem?

	Howard gave an answer to this very exact problem.  Read the links.

	He was not suggesting a "manual" operation.  He was simply
suggesting that you store the Max UID in a separate entry of its own, and
then when it comes time to increment it, to use the delete/add below.

	Because the entire delete/add is atomic, meaning, the whole thing
fails or it doesn't, you have avoided the race condition.  (More
specifically, if the race condition _is_ encountered, your modify op will
fail, because the uidNumber you're searching to change won't be there
anymore, thus avoiding two users with the same uidNumber.)  You will be
notified of the failure, so just try it again until it works.  (...with
some kind of time backoff, and maximum number of tries, etc.)

	...and you can do that all programmatically.

	At least, that is how I understood the issue.


--Derek