summaryrefslogtreecommitdiff
path: root/heat/objects
diff options
context:
space:
mode:
authorPavlo Shchelokovskyy <shchelokovskyy@gmail.com>2019-11-07 14:03:07 +0200
committerPavlo Shchelokovskyy <pshchelokovskyy@mirantis.com>2020-01-14 07:23:19 +0000
commit56f6e583d19ef4dd0c1462bfece677a6ec2fa756 (patch)
treed1d9ce15597c05eb61a99290161f2c1824e73eaf /heat/objects
parent329570afe76a8ea84dcbe2e2ea681335e4d0fa9b (diff)
downloadheat-56f6e583d19ef4dd0c1462bfece677a6ec2fa756.tar.gz
Use random exponential delay
this is much more suited for resolving contention when accessing a (lockable) shared resource. Change-Id: I93abdbf8a9532af1aec7ad15a6f384beb9fc3ff9
Diffstat (limited to 'heat/objects')
-rw-r--r--heat/objects/resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/heat/objects/resource.py b/heat/objects/resource.py
index 3aba3405f..315f7f0a6 100644
--- a/heat/objects/resource.py
+++ b/heat/objects/resource.py
@@ -41,7 +41,7 @@ LOG = logging.getLogger(__name__)
def retry_on_conflict(func):
wrapper = tenacity.retry(
stop=tenacity.stop_after_attempt(11),
- wait=tenacity.wait_random(max=2),
+ wait=tenacity.wait_random_exponential(multiplier=0.5, max=60),
retry=tenacity.retry_if_exception_type(
exception.ConcurrentTransaction),
reraise=True)