This reproduces the bug to demonstrate the problem in a real MySQL
database (the bug cannot be reproduced using sqlite) and verify that
the fix works properly.
The bug has to do with parallel transactions and isolation between
transactions and the sqlite database does not have any isolation
between operations on the same database connection:
and we can't use separate in-memory database connections to sqlite for
each transaction because each separate connection creates its own
copy of the database. What we want is one copy but isolated
transactions writing and reading from that one copy.
Note: this is a stable-only change because the placement code
containing the bug was temporary data-transitioning code that no longer
exists in placement after Queens.
Reviewed: https:/ /review. opendev. org/756636 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7d2a4916950 78742c3e11cd22b beae0a1e4e1591
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 7d2a49169507874 2c3e11cd22bbeae 0a1e4e1591
Author: melanie witt <email address hidden>
Date: Thu Oct 8 02:33:14 2020 +0000
[stable-only] Add functional test for bug 1731668
This reproduces the bug to demonstrate the problem in a real MySQL
database (the bug cannot be reproduced using sqlite) and verify that
the fix works properly.
The bug has to do with parallel transactions and isolation between
transactions and the sqlite database does not have any isolation
between operations on the same database connection:
https:/ /www.sqlite. org/isolation. html
and we can't use separate in-memory database connections to sqlite for
each transaction because each separate connection creates its own
copy of the database. What we want is one copy but isolated
transactions writing and reading from that one copy.
Note: this is a stable-only change because the placement code
containing the bug was temporary data-transitioning code that no longer
exists in placement after Queens.
Related-Bug: #1731668
Change-Id: I93d34c68bf8951 1dfeb53a4776c47 8b88463f24f