1 |
W dniu sob, 31.03.2018 o godzinie 19∶46 -0700, użytkownik Zac Medico |
2 |
napisał: |
3 |
> Since key refresh is prone to failure, retry using exponential |
4 |
> backoff with random jitter. This adds the following sync-openpgp-* |
5 |
> configuration settings: |
6 |
> |
7 |
> sync-openpgp-key-refresh-retry-count = 40 |
8 |
> |
9 |
> Maximum number of times to retry key refresh if it fails. Between |
10 |
> each key refresh attempt, there is an exponential delay with a |
11 |
> constant multiplier and a uniform random multiplier between 0 and 1. |
12 |
> |
13 |
> sync-openpgp-key-refresh-retry-delay-exp-base = 2 |
14 |
> |
15 |
> The base of the exponential expression. The exponent is the number |
16 |
> of previous refresh attempts. |
17 |
> |
18 |
> sync-openpgp-key-refresh-retry-delay-max = 60 |
19 |
> |
20 |
> Maximum delay between each retry attempt, in units of seconds. This |
21 |
> places a limit on the length of the exponential delay. |
22 |
> |
23 |
> sync-openpgp-key-refresh-retry-delay-mult = 4 |
24 |
> |
25 |
> Multiplier for the exponential delay. |
26 |
> |
27 |
> sync-openpgp-key-refresh-retry-overall-timeout = 1200 |
28 |
> |
29 |
> Combined time limit for all refresh attempts, in units of seconds. |
30 |
> |
31 |
> Bug: https://bugs.gentoo.org/649276 |
32 |
> |
33 |
> Zac Medico (4): |
34 |
> Add ForkExecutor (bug 649588) |
35 |
> Add ExponentialBackoff and RandomExponentialBackoff |
36 |
> Add retry decorator (API inspired by tenacity) |
37 |
> rsync: add key refresh retry (bug 649276) |
38 |
> |
39 |
> cnf/repos.conf | 5 + |
40 |
> man/portage.5 | 19 +++ |
41 |
> pym/portage/repository/config.py | 22 ++++ |
42 |
> pym/portage/sync/modules/rsync/rsync.py | 16 ++- |
43 |
> pym/portage/sync/syncbase.py | 85 +++++++++++- |
44 |
> pym/portage/tests/util/futures/test_retry.py | 147 +++++++++++++++++++++ |
45 |
> pym/portage/util/_eventloop/EventLoop.py | 45 ++++++- |
46 |
> pym/portage/util/backoff.py | 48 +++++++ |
47 |
> pym/portage/util/futures/executor/__init__.py | 0 |
48 |
> pym/portage/util/futures/executor/fork.py | 130 +++++++++++++++++++ |
49 |
> pym/portage/util/futures/futures.py | 6 + |
50 |
> pym/portage/util/futures/retry.py | 178 ++++++++++++++++++++++++++ |
51 |
> 12 files changed, 697 insertions(+), 4 deletions(-) |
52 |
> create mode 100644 pym/portage/tests/util/futures/test_retry.py |
53 |
> create mode 100644 pym/portage/util/backoff.py |
54 |
> create mode 100644 pym/portage/util/futures/executor/__init__.py |
55 |
> create mode 100644 pym/portage/util/futures/executor/fork.py |
56 |
> create mode 100644 pym/portage/util/futures/retry.py |
57 |
> |
58 |
|
59 |
This essentially looks like ~700 lines of code to try to workaround |
60 |
broken networking. I would rather try to do that using 5 lines of code |
61 |
but that's just me, and my programs aren't enterprise quality. I just |
62 |
hope it actually solves as many problems as it's going to introduce. |
63 |
|
64 |
-- |
65 |
Best regards, |
66 |
Michał Górny |