Re: mod_dav_svn and multiple apache processes

Viacheslav Zholudev <[email protected]> Wed, 2 Dec 2009 15:52:02 +0100
Newsgroups gmane.comp.version-control.subversion.devel,gmane.comp.version-control.subversion.rapidsvn.devel
Message-ID <[email protected]>
Hi Michael,

thanks for the answer. It sufficiently clarifies things for me. However, I have one more question:
Let's assume that SVN client commits two big files in the same SVN transaction. Could it happen that mod_dav_svn writes pieces of those two big files to the "strings" simultaneously? I.e. part1_file1, part1_file2, part2_file1, part2_file2 or in some other mixed order?

Thanks,
Vyacheslav


On Dec 2, 2009, at 3:29 PM, C. Michael Pilato wrote:

> Viacheslav Zholudev wrote:
>> Hi,
>> 
>> Please help me out in understanding internals of BDB-based subversion.
>> 
>> When committing files to my repository over HTTP, I noticed that Apache uses multiple processes to serve my commit. Here I've got a couple of questions:
>> 1) Shouldn't Apache use only one process per SVN transaction? I thought it was the case.
> 
> Not necessarily.  Subversion was designed to allow for piecemeal transaction
> build-up and commit.  Apache was designed to give its admins the ability to
> limit the number of requests and such that any given child process handles.
> 
>> 2) How does mod_dav_svn distribute commit work among processes?
> 
> You give mod_dav_svn more credit than it deserves.  Subversion clients don't
> realize that they are talking to more than one Apache process, and generally
> *aren't* talking to more than one Apache process at any given time.  All the
> client knows is "I'm talking to the server".  All that mod_dav_svn knows is
> "Apache has asked me to handle this request".  It's Apache itself that
> decides which child process to hand the request off to, and it does so
> without any particularly interesting heuristics.  There's nothing like a
> load balancer or anything of that sort at work here.
> 
>> 3) May mod_dav_svn uses different svn_fs_t objects for writing the same file to the SVN's backend?
>> 4) How mod_dav_svn decides when to open and close svn_fs_t* object
> 
> A given mod_dav_svn process should only use one svn_fs_t per request,
> because if I'm not mistaken, mod_dav_svn caches the svn_repos_t and svn_fs_t
> objects that it opens in Apache's connection pool (a block of memory whose
> lifetime matches an Apache connection).  Those objects are closed when the
> connection pool is destroyed (that is, when Apache closes the connection).
> 
>> 5) Where I can read more about mod_dav_svn (except the code)
> 
> Heh.  Um ...  Er ... what documentation?
> 
> -- 
> C. Michael Pilato <[email protected]>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Best,
Vyacheslav

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

Please start new threads on the <[email protected]> mailing list.
To subscribe to the new list, send an empty e-mail to <[email protected]>.