jugglingdb icon indicating copy to clipboard operation
jugglingdb copied to clipboard

Uniqueness validation is prone to race conditions.

Open qubyte opened this issue 10 years ago • 14 comments

I'm not really sure what can be done about this, since any fix would likely be at the adaptor level. We currently see uniqueness violations when two model instances with an identical (asserted unique) field are created very close together (i.e. close enough that the uniqueness has been tested for both before the first new instance is created). For example, if you create two new users with the same (should be unique) username at the same time, then they will succeed.

qubyte avatar Mar 21 '14 11:03 qubyte