yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #88984
[Bug 1975837] Re: ``ovn_revision_bumbers_db._ensure_revision_row_exist`` is mixing DB contexts
Reviewed: https://review.opendev.org/c/openstack/neutron/+/843478
Committed: https://opendev.org/openstack/neutron/commit/39d751a33265e8780828b3aca10a781726d0a300
Submitter: "Zuul (22348)"
Branch: master
commit 39d751a33265e8780828b3aca10a781726d0a300
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Sun May 15 01:28:32 2022 +0000
Refactor the OVN revision module to access the DB correctly
Method ``_ensure_revision_row_exist`` creates a DB reader context
when called from ``bump_revision``. This call is always done from
inside a DB write context. This method removes the unneded reader
context.
Closes-Bug: #1975837
Change-Id: Ifb500eef5513e930bf3a22d99183ca348e5fc427
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1975837
Title:
``ovn_revision_bumbers_db._ensure_revision_row_exist`` is mixing DB
contexts
Status in neutron:
Fix Released
Bug description:
The method ``ovn_revision_bumbers_db._ensure_revision_row_exist``
creates a DB reader decorator to check if the "OVNRevisionNumbers"
register exists, based on the resource ID. If it doesn't, the method
calls ``create_initial_revision``, that creates a DB writer context
inside the reader one.
In older versions (networking-ovn Train for example), the error is
even worst, as described in [1]. Inside the DB reader context we catch
a DB exception without ending this transaction or rolling back. Then
we call the ``create_initial_revision`` method, opening a new write
context inside the reader one.
Related Bugzilla: [1]
[1]https://bugzilla.redhat.com/show_bug.cgi?id=2090757
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1975837/+subscriptions
References