On Thu, Jul 15, 2004 at 06:09:29PM -0400, Jim Fulton wrote:
Locks are important, however, in cases such as generating unique IDs based on integer attributes in a database.
I don't know what this is.
Well, let's say I wanted to have a unique ID for payments (people want to refer to them for number) -- each payment instance created should have its own ID.
This is something we never managed to sort out in IndexedCatalog, and I wonder if anyone else ever has.
In the regular catalog, we pick ids and let normal time-stamp-based concurrency control tell us when there is a conflict.
Yes, but then you need to change IDs at commit time. If I want to start a transaction by showing the user a certain unique ID that was allocated, I run the risk of having to tell him "oh, sorry, we conflicted on that ID, I need to give you another one".
The database itself uses a short-lived lock to generate oids.
Functionality which would be interesting if it were publically available to solve the aforementioned problem. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331