From 7c7eb5021f082984b98333da50d99c27a26ff2a8 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Mon, 10 Dec 2018 15:24:27 +0000 Subject: [PATCH] Remove writer context from _ensure_aggregates We are already in a writer context, via _set_aggregates, we don't need to ask for it again. This is in preparation of changing the way the retry is done in the _ensure_aggrgates method, in subsequent patches. Change-Id: I1c5c831ae27c3a1936e4782ceccb4d4b39c31b65 Related-Bug: #1804453 --- placement/objects/resource_provider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/placement/objects/resource_provider.py b/placement/objects/resource_provider.py index 3f2980f84..ff2f56af4 100644 --- a/placement/objects/resource_provider.py +++ b/placement/objects/resource_provider.py @@ -511,7 +511,6 @@ 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.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.