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

Re: Any FSFS rep-sharing experts out there?

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Thu, 08 Oct 2009 14:10:16 -0400

Daniel Shahaf wrote:
> C. Michael Pilato wrote on Thu, 8 Oct 2009 at 12:51 -0400:
>> Branko Cibej wrote:
>>> The rep-cache database gets opened deep within svn_fs_fs__open and
>>> svn_fs_fs__create. We don't really have a way to distinguish between
>>> open-for-read and open-for-write in svn_fs_open. I can't form an opinion
>>> right now on whether that's a serious omission or not, but in any case
>>> adding an open-mode would be a huge conceptional change, of the svn-2.0
>>> kind, IMHO.
>> I can't see why we'd need to add different access modes. Why not simply
>> make the code avoid opening the cache database until it is needed?
>
> I took a stab, see attached.
>
> The ideas were:
>
> * centralize reading the config (avoid code duplication)
> * open the DB as late as possible (but don't bother closing it once it's opened)
> * write to the DB only after finishing the FS commit (thus enabling commit_body()
> to be run outside the sqlite txn)
>
> It passes tests (C, basic, and commit) (but I'm positive I could have bugs
> that the tests wouldn't catch).

. o O ( I love open source software. )

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405259

Received on 2009-10-08 20:10:27 CEST

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.