[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: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 8 Oct 2009 20:07:14 +0200 (IST)

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).

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405246

Received on 2009-10-08 20:07:35 CEST

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