neutron-lib/releasenotes/notes/reset-db-retry-settings-49e51cef4c842f69.yaml
LIU Yulong ed62a06a53 Make the DB retry mechanism more robust
Currently in the worst case retry interval is:
[0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 10, 10, 10]
This may cause some neutron DB action fail, and result an
API 500/40X error, for instance, the IP allocation get a
large failure chance with such config.

After this change, the worst case retry interval will look
something like this:
[0.5, 1, 2, 4, 8, 10, 10, ... 10]

So, for the new value 20 and 0.5, in the worst case the total
time cost will be 165.5s. For the old config, it's  42.7s. It's
not too radical for the new retry input params. And we get a
higher rate of API success.

Change-Id: I5ad139bdfb3ae125658b36d05f85f139a1b47bee
Closes-Bug: #1777968
2018-08-11 17:34:28 +08:00

11 lines
442 B
YAML

---
fixes:
- |
Increase the DB retry interval and max retry times for the
``retry_db_errors`` decorator in ``neutron_lib.db.api`` to
0.5 seconds and 20 times, respectively. For those actions
which have a higher chance for DBDeadlock, users should have
a higher success rate due to the larger random range and retry
times. For more information
see bug `1777968 <https://bugs.launchpad.net/neutron/+bug/1777968>`_