On Dec 7, 2009, at 1:37 PM, Adam Heath wrote: > David E Jones wrote: >> Just a quick thing I noticed while looking at this again: this won't prevent >> conflicts in multi-server deployments. >> >> -David > > This patch is completely, 100% wrong, and won't fix the problem. > > > install ofbiz, install demo data, run it. > > /usr/sbin/ab -c30 -t 50 http://localhost:8080/webtools/control/main > > It has absolutely nothing to do with any database, nothing to do with > synchronization. The faster your computer that is running ofbiz, the > faster it can respond to requests, and the easier it becomes to hit > this bug.
You're right. Just because it's synchronized doesn't mean that you won't get multiple calls within a millisecond. I guess we have two options: 1. query to check for a conflict and add 1ms if there is a conflict 2. change the entity to use a sequenced ID as the pk instead of the timestamp -David
