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

Re: on-the-fly lock checking

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2004-12-03 17:36:48 CET

C. Michael Pilato wrote:

>Branko ─îibej <brane@xbc.nu> writes:
>>Ben Collins-Sussman wrote:
>>>So I'm going to rip the on-the-fly lock checking out of BDB's public
>>>fs funcs, and fitz going to avoid coding that feature in FSFS.
>>>Meanwhile, I'm going to create some libsvn_repos wrappers around the 8
>>>or so fs-write routines. These wrappers will do on-the-fly lock
>>>checking, and will be optionally available for use by both server
>>I'm on the verge of suggesting we deprecate all the FS wrappers in
>>libsvn_repos, even the new ones...what a mess...
>Nonsense. There's nothing messy about any of it. The filesystem
>library has an API, and does its thing. The repository library wraps
>the filesystem API to do things that are flatly wrong for the
>filesystem API to do. If you can find a way to wrap the FS without
>using wrappers, I'm all ears (or eyes).
The FS wrappers today are doing two things:

    * running hooks
    * checking out-of-datendess

We obviously don't need wrappers for running hooks; as I told Ben the
other day on IRC, a set of callbacks would serve much better (/and/ we'd
be able to finally implement read hooks).

The out-of datedness check is obviously a performance optimisation, and
any way I look at it, it doetn's belong in libsvn_repos. I mean, it's a
bit funny to have libsvn_repos do some of the out-of-date checks, and
libsvn_fs do others. The argument that a user can use a fs txn as a
scratch area, so the fs shouldn't do out-of-date checks until
commit...well, it holds water up to a point (even though IIRC there are
not /right now/ any such applications). Now, I think you'll agree that
it makes no sense to theck out-of-detedness for some FS operations but
not others /within a single txn/. So the decision whether the checks
should be performed always or just at commit canbe made at txn creation
time, and is a parameter of the transaction. Ten all FS functions that
take a txn parameter can decide whether to perform the checks or not.
The FS api remains unchanged (except for create_txn, which gets an extra
flag); the repos wrappers go away, and everybody's happy.

(s/out-of-date/lock/g in the above, same argument applies)

-- Brane

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 3 17:38:41 2004

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.