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

Re: New library init requirement to support *new* functionality?

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2006-06-21 09:11:58 CEST

Erik Huelsmann wrote:
> From a conversation between Vlad and Garrett concerning requirements
> for SASL libraries and a single-threaded initialisation:
>
>>> Also, how do we make sure that sasl_{client,server}_init() is only
>>> called once? I dug up this thread from the archives:
>>>
>>> http://svn.haxx.se/dev/archive-2003-05/2224.shtml
>>>
>>> Is there a solution for this?
>
>> Well, it really depends on how correct we want to be. We can't be
>> 100% correct, since we can't rely on users of the Subversion libraries
>> calling an initialize function, since we didn't have one in Subversion
>> 1.0, and thus we can't introduce that requirement now. We can add a
>> new initialization function and request that people call it, but we
>> still need to work even if it wasn't called. Perhaps making the
>> current sasl init function you've got public, but inserting extra
>> calls to it in ra_svn before we make use of sasl code, just in case...
>
>> For other examples of this sort of thing, see svn_utf_initialize,
>> although that's not really the same thing, since without it we still
>> work, we just work more slowly. Also svn_fs_initialize().
>
> Well, Garrett, I don't agree here: Since SASL is adding functionality
> to our libraries, we'll be able to add new requirements: there's
> nothing to be backward compatible with.
>
> So, in this case, I'm arguing: We can require single-threaded init,
> since, if the library-user doesn't call this function, we simply fall
> back to our old behaviour. Nothing wrong with that: servers will need
> to support it anyways (to support old clients) and clients will need
> to support it (to support old servers).
Last I heard, if we compile with SASL, we don't need the old auth code,
since SASL does it all for us. If that's still the case, what you
propose is not an option.

And it's not an option in any case, because dynamically-linked clients
built against the 1.3 libraries must work with the 1.4 libraries (it's
not an issue for svnserve, we control that).

OF course, we do have this particular problem solved (at least the
single-threaded initialisation part ...) in
subversion/libsvn_fs_base/bdb/env.c: svn_fs_bdb__init. A lot better than
svn_utf_initialise, because the BDB env cache really really has to be
unique per process.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 21 09:12:36 2006

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