C. Michael Pilato wrote:
>Branko ─îibej <email@example.com> 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)
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Fri Dec 3 17:38:41 2004