On 02/12/2015 02:36 PM, Salvatore Orlando wrote: > - I promised a non blocking algorithm for IP allocation. The one I was > developing was based on specifying the primary key on the ip_requests > table in a way that it would prevent two concurrent requests from > getting the same address, and would just retry getting an address until > the primary key constraint was satisfied. However, recent information > emerged on MySQL galera's (*) data set [2] certification clarified that > this kind of algorithm would still result in a deadlock error from > failed data set certification. It is worth noting that in this case a > solution based on traditional compare-and-swap is not possible because > concurrent requests would be inserting data at the same time. I am now > working on an alternative solution, and I would like to first implement > a PoC for it (so that I can prove it works).
Would something like the following work: insert the data in the DB, if any error is got open a new transaction and try again ? enikanorov proposed a retry mechanism here [1] . Can't wait for your POC! I had been playing a while in the past to try to remove the locking from the IP allocation, it's hard! cheers, Rossella [1] https://review.openstack.org/#/c/149261/ __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
