Disable read locks for readonly cvs-mirror

RESOLVED FIXED

Status

mozilla.org Graveyard
Server Operations
RESOLVED FIXED
16 years ago
3 years ago

People

(Reporter: hacker formerly known as seawood@netscape.com, Assigned: Dawn Endico)

Tracking

Details

Attachments

(4 attachments)

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.
Created attachment 111495 [details] [diff] [review]
Add readonly repository support
Created attachment 111496 [details] [diff] [review]
Add options support to cvs

This patch is required so that we can turn readonly support on via the options
file for every transaction.
Created attachment 111865 [details] [diff] [review]
another patch to disable read locks

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
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 5

16 years ago
Created attachment 113146 [details] [diff] [review]
Diffs for readlock disabling and security update

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.