[placement] Make _ensure_aggregate context not independent
The use of the independent context on _ensure_aggregate appears to be unnecessary. It causes file-based uses of SQLite dbs to fail (with database locked errors, as reported in the associated bug, 1789633) and thus may mask issues with other databases. Adding the independent context manager was the result of a series of "throw stuff at the wall and see what sticks" patches, but it looks now that it is not required, and in some situations causes problems. Runs through the gate show that the behavior it was fixing (as described in bug 1786703) is not happening. Change-Id: I1f325d55ec256db34a4c3bbd230dcd8a91bce542 Related-Bug: #1786703 Closes-Bug: #1789633
This commit is contained in:
parent
6522ea3ecf
commit
757983a4cf
|
@ -488,7 +488,7 @@ def _anchors_for_sharing_providers(context, rp_ids, get_id=False):
|
|||
return set([(r[0], r[1]) for r in context.session.execute(sel).fetchall()])
|
||||
|
||||
|
||||
@db_api.placement_context_manager.independent.writer
|
||||
@db_api.placement_context_manager.writer
|
||||
def _ensure_aggregate(ctx, agg_uuid):
|
||||
"""Finds an aggregate and returns its internal ID. If not found, creates
|
||||
the aggregate and returns the new aggregate's internal ID.
|
||||
|
|
Loading…
Reference in New Issue