Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 0/4] Add sync-rcu support for rsync (bug 662070)
Date: Fri, 10 Aug 2018 00:11:35
Message-Id: 20180809171132.797e5077@professor-x
In Reply to: [gentoo-portage-dev] [PATCH 0/4] Add sync-rcu support for rsync (bug 662070) by Zac Medico
1 On Mon, 6 Aug 2018 00:40:29 -0700
2 Zac Medico <zmedico@g.o> wrote:
3
4 > Add a boolean sync-rcu repos.conf setting that behaves as follows:
5 >
6 > sync-rcu = yes|no
7 >
8 > Enable read-copy-update (RCU) behavior for sync operations. The
9 > current latest immutable version of a repository will be
10 > referenced by a symlink found where the repository would normally be
11 > located (see the location setting). Repository consumers should
12 > resolve the cannonical path of this symlink before attempt to access
13 > the repository, and all operations should be read-only, since
14 > the repository is considered immutable. Updates occur by atomic
15 > replacement of the symlink, which causes new consumers to use the
16 > new immutable version, while any earlier consumers continue to
17 > use the cannonical path that was resolved earlier. This option
18 > requires sync-allow-hardlinks and sync-rcu-store-dir options to
19 > be enabled, and currently also requires that sync-type is set
20 > to rsync. This option is disabled by default, since the symlink
21 > usage would require special handling for scenarios involving bind
22 > mounts and chroots.
23 >
24 > sync-rcu-store-dir
25 >
26 > Directory path reserved for sync-rcu storage. This directory must
27 > have a unique value for each repository (do not set it in the
28 > DEFAULT section). This directory must not contain any other files
29 > or directories aside from those that are created automatically
30 > when sync-rcu is enabled.
31 >
32 > sync-rcu-spare-snapshots = 1
33 >
34 > Number of spare snapshots for sync-rcu to retain with expired
35 > ttl. This protects the previous latest snapshot from being removed
36 > immediately after a new version becomes available, since it might
37 > still be used by running processes.
38 >
39 > sync-rcu-ttl-days = 7
40 >
41 > Number of days for sync-rcu to retain previous immutable snapshots
42 > of a repository. After the ttl of a particular snapshot has
43 > expired, it will be remove automatically (the latest snapshot
44 > is exempt, and sync-rcu-spare-snapshots configures the number of
45 > previous snapshots that are exempt). If the ttl is set too low,
46 > then a snapshot could expire while it is in use by a running
47 > process.
48 >
49 > Zac Medico (4):
50 > Implement asyncio.iscoroutinefunction for compat_coroutine
51 > Add _sync_decorator module
52 > rsync: split out repo storage framework
53 > Add sync-rcu support for rsync (bug 662070)
54 >
55 > lib/portage/repository/config.py | 36 ++-
56 > lib/portage/repository/storage/__init__.py | 0
57 > .../repository/storage/hardlink_quarantine.py | 95 ++++++++
58 > lib/portage/repository/storage/hardlink_rcu.py | 251
59 > +++++++++++++++++++++
60 > lib/portage/repository/storage/inplace.py | 49 ++++
61 > lib/portage/repository/storage/interface.py | 87 +++++++
62 > lib/portage/sync/controller.py | 1 +
63 > lib/portage/sync/modules/rsync/rsync.py | 85 ++-----
64 > lib/portage/sync/syncbase.py | 33
65 > +++ .../tests/util/futures/test_compat_coroutine.py | 14 ++
66 > lib/portage/util/futures/_asyncio/__init__.py | 14 ++
67 > lib/portage/util/futures/_sync_decorator.py | 54 +++++
68 > lib/portage/util/futures/compat_coroutine.py | 12 +
69 > man/portage.5 | 35 +++ 14 files
70 > changed, 700 insertions(+), 66 deletions(-) create mode 100644
71 > lib/portage/repository/storage/__init__.py create mode 100644
72 > lib/portage/repository/storage/hardlink_quarantine.py create mode
73 > 100644 lib/portage/repository/storage/hardlink_rcu.py create mode
74 > 100644 lib/portage/repository/storage/inplace.py create mode 100644
75 > lib/portage/repository/storage/interface.py create mode 100644
76 > lib/portage/util/futures/_sync_decorator.py
77 >
78
79 series looks good, just the one typo