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

Re: Subversion's use of Berkeley DB [#11511]

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2004-12-09 23:51:15 CET

--On Thursday, December 9, 2004 11:37 PM +0100 "Branko ?ibej"
<brane@xbc.nu> wrote:

> Justin Erenkrantz wrote:
>> mod_dav_svn already caches the fs/repos.
> Yes, but not for the lifetime of the httpd process, iirc.

As svn_repos_t can't be shared across threads or processes, each
process/thread must have its own private copy.

However, once httpd is initialized, we should assume that we are already in
a 'safe' state: because we optionally ran recover at httpd initialization,
if we could.

>> And, we wouldn't need to keep it open after it checks: it'd just need
>> to ensure that it is an safe state.
> You can't check if it's in a safe state. You have to open the
> environment, and if you're the only process in the environment, run
> recovery.

Right - however, having 50 httpds constantly checking if it is the only
process is impractical on every fs_open. This is why I think the recovery
check can't be coupled with fs_open: it needs to be split out and the
libsvn_fs_base using code (or libsvn_repos-using code) needs to say, "Hey,
I'm starting. If you can, run recovery now. If not, move on."

For mod_dav_svn, the optimal (and correct!) number of times to check is
exactly once. Any more and we're going to get nailed. -- justin

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 10 03:32:31 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.