yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #61690
[Bug 1496586] Re: Avoid the pattern sql select/delete
[Expired for neutron because there has been no activity for 60 days.]
** Changed in: neutron
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1496586
Title:
Avoid the pattern sql select/delete
Status in neutron:
Expired
Bug description:
The following pattern:
obj = query.filter(...).one()
context.session.delete(obj)
is racy because obj can be deleted between the select and the delete,
we should prefer when possible the pattern:
count = query.filter(...).delete(synchronize_session=False)
if not count:
raise NotFound
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1496586/+subscriptions
References