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

svnserve and --config-file

From: Ben Reser <ben_at_reser.org>
Date: Wed, 5 Dec 2012 10:50:50 -0800

Our documentation for svnserve --config-file says
            When specified, svnserve reads filename once at program
startup and caches
            the svnserve configuration and any passwords and
authorization configura-
            tion referenced from filename. svnserve will not read
any per-repository
            conf/svnserve.conf files when this option is
used. See the
            svnserve.conf(5) man page for details of the file format
for this option.

No other mode of operation for svnserve or httpd caches the authz file
at startup. I think this behavior came into existence simply because
it was expedient to add --config-file this way given that the
load_configs() function loads the authzdb/pwdb as well as the
configuration in the svnserve.conf file. However, I'm questioning why
anyone would find this desirable. Loading the svnserve.conf once and
caching it makes sense it's similar to what httpd does with
httpd.conf. But caching the authz and pwdb files means changes to
those files require a reload of svnserve. I doubt svnserve.conf
requires changes that often but I'd imagine that authz and pwdb need
changes fairly regularly. I'd imagine this hasn't come up since most
people just don't use --config-file and put a svnserve.conf in the
repo conf file (implicit svnserve.conf) and does not have this issue
since the configuration is loaded per connection.

I've refactored the code in svnserve to split load_configs up so that
I could handle repos relative URLs with --config-file (the
in-repo-authz branch, though this code isn't commited yet). However,
now that I've done this I've realized that the absolute URLs will only
be loaded at startup. Now I'm questioning why we have this behavior
at all since preserving it adds complexity and I doubt any user
desires this behavior.

It is obviously slightly faster, but given that most of our modes of
operation are loading this data on every request, I doubt it's a
significant slowdown.

I'm going to just blow this behavior away unless someone has some
objection to this. The svnserve.conf passed to --config-file would be
cached at startup but the files referenced in it would be loaded on
each request.
Received on 2012-12-05 19:51:36 CET

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.