Skip to content

Commit

Permalink
Remove reduntant call to update_instance_info_cache
Browse files Browse the repository at this point in the history
get_instance_nw_info calls _get_instance_nw_info,
which is decorated with @refresh_cache. This in
turn calls update_instance_info_cache, again. This
is both expensive and more importantly dangerous because
the method update_instance_info_cache may call
_get_instance_nw_info itself, thus causing an infinite
loop.

Change-Id: Id8f0241d1c6609cf4e064ee6855228ae7de250e2
Partial-bug: 1235435
  • Loading branch information
armando-migliaccio committed Nov 15, 2013
1 parent 706c690 commit 651fac3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nova/network/neutronv2/api.py
Expand Up @@ -447,8 +447,6 @@ def get_instance_nw_info(self, context, instance, networks=None):
and update cache.
"""
result = self._get_instance_nw_info(context, instance, networks)
update_instance_info_cache(self, context, instance, result,
update_cells=False)
return result

@refresh_cache
Expand Down

0 comments on commit 651fac3

Please sign in to comment.