bug and tests in 'instance_info_cache'
Added unit tests for 'instance_info_cache' db section, fixed incorrect behaviour with ignoring exception that relates to introducing oslo.db enginefacade. Closes-Bug: #1520563 Closes-Bug: #1520567 Co-Authored-By: Sergey Nikitin <snikitin@mirantis.com> Change-Id: I35ec688d7b176e0cb0b9ce6bd0c241b6631422c5
This commit is contained in:
parent
35ba87de07
commit
d21ff3056b
@ -2697,7 +2697,8 @@ def instance_info_cache_update(context, instance_uuid, values):
|
||||
values['instance_uuid'] = instance_uuid
|
||||
|
||||
try:
|
||||
info_cache.update(values)
|
||||
with main_context_manager.writer.savepoint.using(context):
|
||||
info_cache.update(values)
|
||||
except db_exc.DBDuplicateEntry:
|
||||
# NOTE(sirp): Possible race if two greenthreads attempt to
|
||||
# recreate the instance cache entry at the same time. First one
|
||||
|
Loading…
x
Reference in New Issue
Block a user