From: Zac Medico <zmedico@gentoo.org>
To: "Michał Górny" <mgorny@gentoo.org>, gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: Re: [gentoo-portage-dev] [PATCH 0/4] rsync: add key refresh retry (bug 649276)
Date: Sun, 1 Apr 2018 08:59:35 -0700 [thread overview]
Message-ID: <ab63dff2-e293-a8e9-df68-2256a73ca1bd@gentoo.org> (raw)
In-Reply-To: <1522580236.7711.6.camel@gentoo.org>
[-- Attachment #1.1: Type: text/plain, Size: 3140 bytes --]
On 04/01/2018 03:57 AM, Michał Górny wrote:
> W dniu sob, 31.03.2018 o godzinie 19∶46 -0700, użytkownik Zac Medico
> napisał:
>> Since key refresh is prone to failure, retry using exponential
>> backoff with random jitter. This adds the following sync-openpgp-*
>> configuration settings:
>>
>> sync-openpgp-key-refresh-retry-count = 40
>>
>> Maximum number of times to retry key refresh if it fails. Between
>> each key refresh attempt, there is an exponential delay with a
>> constant multiplier and a uniform random multiplier between 0 and 1.
>>
>> sync-openpgp-key-refresh-retry-delay-exp-base = 2
>>
>> The base of the exponential expression. The exponent is the number
>> of previous refresh attempts.
>>
>> sync-openpgp-key-refresh-retry-delay-max = 60
>>
>> Maximum delay between each retry attempt, in units of seconds. This
>> places a limit on the length of the exponential delay.
>>
>> sync-openpgp-key-refresh-retry-delay-mult = 4
>>
>> Multiplier for the exponential delay.
>>
>> sync-openpgp-key-refresh-retry-overall-timeout = 1200
>>
>> Combined time limit for all refresh attempts, in units of seconds.
>>
>> Bug: https://bugs.gentoo.org/649276
>>
>> Zac Medico (4):
>> Add ForkExecutor (bug 649588)
>> Add ExponentialBackoff and RandomExponentialBackoff
>> Add retry decorator (API inspired by tenacity)
>> rsync: add key refresh retry (bug 649276)
>>
>> cnf/repos.conf | 5 +
>> man/portage.5 | 19 +++
>> pym/portage/repository/config.py | 22 ++++
>> pym/portage/sync/modules/rsync/rsync.py | 16 ++-
>> pym/portage/sync/syncbase.py | 85 +++++++++++-
>> pym/portage/tests/util/futures/test_retry.py | 147 +++++++++++++++++++++
>> pym/portage/util/_eventloop/EventLoop.py | 45 ++++++-
>> pym/portage/util/backoff.py | 48 +++++++
>> pym/portage/util/futures/executor/__init__.py | 0
>> pym/portage/util/futures/executor/fork.py | 130 +++++++++++++++++++
>> pym/portage/util/futures/futures.py | 6 +
>> pym/portage/util/futures/retry.py | 178 ++++++++++++++++++++++++++
>> 12 files changed, 697 insertions(+), 4 deletions(-)
>> create mode 100644 pym/portage/tests/util/futures/test_retry.py
>> create mode 100644 pym/portage/util/backoff.py
>> create mode 100644 pym/portage/util/futures/executor/__init__.py
>> create mode 100644 pym/portage/util/futures/executor/fork.py
>> create mode 100644 pym/portage/util/futures/retry.py
>>
>
> This essentially looks like ~700 lines of code to try to workaround
> broken networking. I would rather try to do that using 5 lines of code
> but that's just me, and my programs aren't enterprise quality. I just
> hope it actually solves as many problems as it's going to introduce.
The vast majority of this code is generic and reusable, and I do intend
to reuse it. For example, the executor support will be an essential
piece for the asyncio.AbstractEventLoop for bug 649588.
--
Thanks,
Zac
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2018-04-01 15:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-01 2:46 [gentoo-portage-dev] [PATCH 0/4] rsync: add key refresh retry (bug 649276) Zac Medico
2018-04-01 2:46 ` [gentoo-portage-dev] [PATCH 1/4] Add ForkExecutor (bug 649588) Zac Medico
2018-04-01 14:27 ` Alec Warner
2018-04-01 2:46 ` [gentoo-portage-dev] [PATCH 2/4] Add ExponentialBackoff and RandomExponentialBackoff Zac Medico
2018-04-01 2:46 ` [gentoo-portage-dev] [PATCH 3/4] Add retry decorator (API inspired by tenacity) Zac Medico
2018-04-01 14:31 ` Alec Warner
2018-04-01 2:46 ` [gentoo-portage-dev] [PATCH 4/4] rsync: add key refresh retry (bug 649276) Zac Medico
2018-04-01 10:57 ` [gentoo-portage-dev] [PATCH 0/4] " Michał Górny
2018-04-01 15:59 ` Zac Medico [this message]
2018-04-01 18:29 ` Michał Górny
2018-04-01 18:47 ` Fabian Groffen
2018-04-01 18:55 ` Zac Medico
2018-04-01 19:38 ` Alec Warner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab63dff2-e293-a8e9-df68-2256a73ca1bd@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
--cc=mgorny@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox