Revision numbers are bumped in the db flush callback.
It doesn't work well for us because we have surrounding transactions,
which would defer object flushing.
This commit workarounds the issue by retrieving DB objects again.
An alternative would be to make the base class methods provide
DB object for us, similarly to what create methods do.
I don't quite understand why expire_all() is necessary, but without
having them in update_port, get_port() sometimes (not always) see
the previous values of attributes and it makes some tests including
the following ones fail occasionally.
Reviewed: https:/ /review. openstack. org/386396 /git.openstack. org/cgit/ openstack/ networking- midonet/ commit/ ?id=d2d7024850f 9e49031b323bb51 73c3f04c8f496a
Committed: https:/
Submitter: Jenkins
Branch: master
commit d2d7024850f9e49 031b323bb5173c3 f04c8f496a
Author: YAMAMOTO Takashi <email address hidden>
Date: Fri Oct 14 13:20:21 2016 +0900
Retrive DB object after update
Revision numbers are bumped in the db flush callback.
It doesn't work well for us because we have surrounding transactions,
which would defer object flushing.
This commit workarounds the issue by retrieving DB objects again.
An alternative would be to make the base class methods provide
DB object for us, similarly to what create methods do.
I don't quite understand why expire_all() is necessary, but without
having them in update_port, get_port() sometimes (not always) see
the previous values of attributes and it makes some tests including
the following ones fail occasionally.
Closes-Bug: #1633334 7c540f1a0241212 de62da1d930
Change-Id: I370a2e5e987c17