Re: [elephant-devel] Unique key with Elephant

2010-03-19 Thread Ian Eslick
I can't say I've thought deeply about this, but instance creation is wrapped in a transaction - so long as the side effects you are concerned about, including reads the store, they should be atomic due to BDB locking. On Mar 18, 2010, at 6:37 AM, Alex Mizrahi wrote: > IE> Should be easy to add

Re: [elephant-devel] Unique key with Elephant

2010-03-18 Thread Alex Mizrahi
IE> Should be easy to add an index lookup to shared-initialize and a check IE> in indexed slot access as to whether you are changing the unique value. Hmm, there is a problem with this and concurrency -- one thread does a check, it passes and it inserts a value, and another thread does the same

Re: [elephant-devel] Unique key with Elephant

2010-03-14 Thread Ian Eslick
I tend to agree with Alex on this one. Moreover, I'm not going to have time to make changes for awhile, but I'd be willing to review a patch. Should be easy to add an index lookup to shared-initialize and a check in indexed slot access as to whether you are changing the unique value. Can a