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

Re: CVS update: subversion/subversion/include svn_fs.h

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-09-08 04:27:20 CEST

On Thu, Sep 07, 2000 at 05:48:57PM -0500, Jim Blandy wrote:
>...
> How do you plan to recognize and clean up abandoned transactions?

I cannot. ("I" meaning the Apache/mod_dav/mod_dav_svn server)

Recall that the server is stateless. I will (effectively) be returning the
transaction ID in a response to the client. Any necessary SVN-FS bits will
be dropped into the real filesystem and referenced when the client makes
another request, passing that transaction ID.

If the client stops making requests, then we have accumulated some garbage
in the filesystem, and a partial transaction in the SVN-FS.

    Apache/mod_dav(_svn)
       | \
       | \
    DeltaV state SVN-FS
                        |
                      SVN state

I'm not entirely clear on the specifics of the DeltaV state. It will contain
information on DAV activities, working resources, and how those map into the
SVN-FS repository. A DAV activity corresponds to an SVN-FS transaction and
will have a one-to-one correspondence and lifetime.

> Since transactions are persistent, it's not safe for the filesystem to
> clean them up when it discovers it's been restarted, as it can for
> Berkeley DB-level transactions.

Agreed.

> How will you make sure the database doesn't become crowded with
> transactions long forgotten? Should the filesystem provide an
> interface for listing all transactions in progress?

The latter. It should be possible to administratively clean out old
transactions. Bill's suggestion for a timeout is also spot-on. The duration
for a transaction is effectively the upload time for the update. Anything
that hasn't been touched in <N> minutes is probably garbage. (where <N> is
defined to include the upload process itself; uploading that 1G file over
several hours should continue to tweak the timeout threshold)

[ the DoS issue that Bill mentions is minor since (presumably) the only
  person capable of creating a transaction is an authorized committer. ]

I don't have an immediate answer on the UI for reviewing garbage and
cleaning them (web-based, command-line based, etc). And whether we want it
to have none/some/all automatic (timed-out) cleanup vs. a manual
review/clean process.

> I don't need to know this stuff to write the filesystem. I'd be very
> surprised if it makes any difference in the design. I just
> want to understand the outside world a bit.

Right.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:07 2006

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