[Bug 232350] ports-mgmt/pkg: periodic pkg-checksum and pkg-backup interfere with 'overnight' port builds

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Nov 15 15:26:23 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232350

--- Comment #11 from Ian Lepore <ian at FreeBSD.org> ---
(In reply to Alex Kozlov from comment #10)

It is not an error or a problem to be working on a snapshot of the database
taken at the beginning of the periodic run.  This is a standard axiom of fixing
races with lockless (or lock minimization) techniques... it doesn't matter
whether you capture the snapshot before or after some arbitrary action, it only
matters that you capture and operate on a consistant snapshot.  If updates are
happening to the live database while you run the validation on the snapshot,
those updates will be validated in the run the next day, and that situation is
exactly identical to the situation in which running with exclusionary locks
prevented the update from happening until after the validation run completes.

These are not new problems, and the techniques for solving them are not new
either.  I first ran into these problems and the snapshot-based solutions to
them in the 1970s.

The main downside to such techniques is that it requires copying the data to be
validated, and sometimes the size of that data makes that too expensive of an
operation.  That could be the case here, I have no idea how much data would
have to be copied in this instance.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-pkg mailing list