[openstack-dev] [Neutron] DB: transaction isolation and related questions

Mike Bayer mbayer at redhat.com
Wed Nov 19 21:56:01 UTC 2014


> On Nov 19, 2014, at 4:14 PM, Clint Byrum <clint at fewbar.com> wrote:
> 
> 
> One simply cannot rely on multi-statement transactions to always succeed.

agree, but the thing you want is that the transaction either succeeds or explicitly fails, the latter hopefully in such a way that a retry can be added which has a chance at succeeding, if needed.  We have transaction replay logic in place in nova for example based on known failure conditions like concurrency exceptions, and this replay logic works, because it starts a new transaction.   In this specific case, since it’s looping within a transaction where the data won’t change, it’ll never succeed, and the retry mechanism is useless.   But the isolation mode change won’t really help here as pointed out by Jay; discrete transactions have to be used instead.




More information about the OpenStack-dev mailing list