[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Re: Working copy locks and client errors.

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-08-15 21:55:53 CEST

Philip Martin <philip@codematters.co.uk> writes:

> Greg Hudson <ghudson@MIT.EDU> writes:
>
> > On Sun, 2002-08-11 at 18:57, Philip Martin wrote:
> > > Does this sound sensible?
> >
> > This sounds reasonably. Another approach would be to set a flag in the
> > lock indicating that it's currently protecting the running of a log
> > file; that seems perhaps cleaner to me but more error-prone; your answer
> > is probably better.
>
> I was thinking of something like this patch. When an operation fails
> locks are removed if cleanup is not required. Since the decision to
> remove locks is not to be taken lightly, I'm posting the patch here
> first. The important bit is the decision made by the new function
> svn_wc__adm_is_cleanup_required, this is what determines when a lock
> is removed; in this patch it is simply the presence of a log file.

Hmm, before I commit this, a question. The cleanup processing
currently is

          # current cleanup
          make or steal lock
          if log file exists
             run log file
             remove log file
          clean admin tmp area
          remove lock

Now consider the pool cleanup lock-removal. At present it is likely
to run when an error has occurred, although in future it may be normal
to leave locks to pool cleanup. My patch does

          # current patch
          if log file exists
             keep lock
          else
             remove lock

Note, that the presence of files in the admin tmp area is not enough
to stop a lock being removed.

An alternative would be

          # alternative 1
          if log file exists or admin tmp area is not empty
             keep lock
          else
             remove lock

and another would be

          # alternative 2
          if log file exists
             keep lock
          else
            if admin tmp area is not empty
               clean admin tmp area
            remove lock

In all cases the cleanup processing remains much the same. My current
patch is the simplest solution, are there any compelling arguments for
the alternatives? How important are files in the admin tmp area if
there is no log file? I suspect they are not important and thus can
be removed, and are harmless and thus do not *need* to be removed.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 15 21:56:28 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.