Closed Bug 189008 Opened 22 years ago Closed 22 years ago

Disable read locks for readonly cvs-mirror

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: netscape, Assigned: endico)

Details

Attachments

(4 files)

I should've done this to begin with.

Now that we actually control cvs-mirror, can we apply the patches to make it
skip the unnecessary read locks?  Brad & I noticed a signficant increase in pull
times when cvs-mirror was moved from sourceforge due to what looked like an
extreme amount of locking.  I still frequently see 'waiting for lock' messages
which shouldn't be necessary for a read-only server.

I extracted the patches from the current FreeBSD tree and tested them on my
local mirror.  Since I'm the only user, I didn't notice any speed increase but I
did verify that the patch works by removing write privs for every directory in
the repo and was still able to successfully pull.

The basic tradeoff is summed up at http://gcc.gnu.org/ml/gcc/2002-06/msg01458.html :

"cvs' file updates are atomic
on a file level, but not at a directory level.  So it's entirely
possible for someone to make a change to foo.c and foo.h, and an
anoncvs read-only user doing an update at the same time could get
the new version of foo.c but the old version of foo.h."

However, we're suspectible to that problem anyway because we use rsync to sync
the mirror.

"rsyncs of the repository ignore cvs locks altogether, so you've
got the same consistency problems as the read-only-users-don't-lock
setup."

So pulling from cvs-mirror w/o using locks won't be any more "inconsistent" than
it is now.
This patch is required so that we can turn readonly support on via the options
file for every transaction.
Greg Hudson, author of the email at http://www.cvshome.org/dev/patches/readlock
, sent me this patch for CVS version 1.11.2.
Steve Brown has compiled a new binary with support for disabling read locks and
installed it on tegu, so resolving fixed.  Steve, can you attach the patch you
used to this bug (if it's not one of the ones already attached)?
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
this is mostly a slight modification of earlier patches.  It differs from them
mainly in reading the option for disabling locks from the "CVSROOT/config"
file.  Also, it is diffs from CVS 1.11.4 and most of the others are based on
diffs from earlier CVS versions.  Lastly, it includes patches for double-free
bug, etc.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: