[openstack-dev] [neutron][ovo] NeutronDbObject concurrency issues

Michał Dulko michal.dulko at intel.com
Mon May 16 17:01:37 UTC 2016


On 05/16/2016 05:49 PM, Ilya Chukhnakov wrote:
> On 16 May 2016, at 18:18, Michał Dulko <michal.dulko at intel.com
> <mailto:michal.dulko at intel.com>> wrote:
>> In Cinder we're handling similar problems related to race conditions
>> between status check and status change with conditional updates.
>> Basically we're doing "UPDATE table SET status='abc' WHERE id=1 AND
>> status='status_allowing_transition_to_foo';".
> Thanks for the info. I'll certainly look into it. But for now I'm
> planning to reuse
> revision numbers from [1].
>
>> In general the problem you're mentioning is related more to the
>> concurrent DB updates and o.vo never aimed for magically solving that
>> problem. I believe you've had same problem with raw SQLA objects.
> For SQLA we at least have an option to use with_for_update (I've found
> it is being
> used in some places). But with OVO we do not have that level of
> control yet.
>
> [1] https://review.openstack.org/#/c/303966
>

It's not directly related, but this reminds me of tests done by geguileo
[1] some time ago that were comparing different methods of preventing DB
race conditions in concurrent environment. Maybe you'll also find them
useful as you'll probably need to do something like conditional update
to increment a revision number.

[1] https://github.com/Akrog/test-cinder-atomic-states




More information about the OpenStack-dev mailing list