[openstack-dev] [neutron][trunk] objects within transactions
Ihar Hrachyshka
ihrachys at redhat.com
Mon Sep 5 16:51:24 UTC 2016
Gary Kotton <gkotton at vmware.com> wrote:
> Hi,
> It is unclear what our policy is with objects. My understanding is that
> an object should handle all of the database interaction. Is that not one
> of the benefits of the objects? I
> postedhttps://review.openstack.org/#/c/365459 and it has a number of
> interesting comments – the main is that drivers are using the PRECOMIT
> callbacks. Can someone please point out to where these are use. That
> would at least provide some justification for this being blocked.
> Thanks
Objects indeed provide some transactional guarantees, but it does not mean
that consuming code may not have any additional transactional requirements
that will need to be fulfilled by some other code. In the case you
mentioned, transaction is needed to guarantee that all event consumers have
a chance to handle update payload before we actually hit database with our
update).
Ihar
More information about the OpenStack-dev
mailing list