[arch-general] Question about repository updates and atomicity

Jan Alexander Steffens jan.steffens at gmail.com
Sun Aug 18 21:23:17 EDT 2013


On Sun, Aug 18, 2013 at 8:32 PM, Johannes Ernst <jernst at cldstr.com> wrote:
> What happens if that occurs during an rsync? Or is that prevented from happening?
>
> Similarly, what if a client updates from a mirror while the database file is being replaced by rsync?

You can't get a partially updated database, as the replacement of a
database is atomic. Both our dbscripts and rsync ensure that, by using
the basic rename-to-replace approach (see `man 2 rename`). However,
this only applies to single databases.

Before really big changes that affect multiple databases I stop rsync
and wait for all connections to close, to ensure atomicity. For
example, I do this when I move a major GNOME update between
repositories, as that can take a couple of minutes.

I can't speak for others, though.


More information about the arch-general mailing list