You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2011/03/26 15:00:58 UTC

API policy (was: svn commit: r1081528 ...)

On Mar 14, 2011 7:32 PM, <hw...@apache.org> wrote:
>
> Author: hwright
> Date: Mon Mar 14 19:32:04 2011
> New Revision: 1081528
>
> URL: http://svn.apache.org/viewvc?rev=1081528&view=rev
> Log:
> Fix the svnversion test 1 failure introduced in r1081510.  This involves
> exposing the wc_db txn handler to the larger library, rather than just
> wc_db.c.
>
> One of the pristine handling functions was using an SQLite txn, which
> couldn't be nested.  This change allows that txn to be nested.

I would like to state this explicitly: let's not expose SQL transactions in
the wc_db.h interface. This change keeps it within wc_db, but I would hate
to see it go further. I think that would be a horrible breakage of
encapsulation.

I recognize we need to grow the scope of transactions for speed purposes,
but let's do it in a way based on semantics rather than implementation. For
example: to speed checkout, we could have an API to add a complete directory
of nodes, rather than an API to start/end a txn across those single
additions.

Cheers,
-g

Re: API policy

Posted by Greg Stein <gs...@gmail.com>.
On Mar 28, 2011 8:23 AM, "Philip Martin" <ph...@wandisco.com> wrote:
>
> Greg Stein <gs...@gmail.com> writes:
>
> > I recognize we need to grow the scope of transactions for speed
purposes,
> > but let's do it in a way based on semantics rather than implementation.
For
> > example: to speed checkout, we could have an API to add a complete
directory
> > of nodes, rather than an API to start/end a txn across those single
> > additions.
>
> That doesn't seem to fit with our current editor.  When we want to add a
> directory we don't know the nodes.  If we delay adding the directory
> until the nodes are known we would have to store the entire checkout
> somewhere else.

I'm well aware of the implications. I'm just trying to say: let's try to
avoid poisoning our entire WC library with SQL transaction concepts, which
should be restricted to just the internals of wc_db.

Cheers,
-g

Re: API policy

Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:

> I recognize we need to grow the scope of transactions for speed purposes,
> but let's do it in a way based on semantics rather than implementation. For
> example: to speed checkout, we could have an API to add a complete directory
> of nodes, rather than an API to start/end a txn across those single
> additions.

That doesn't seem to fit with our current editor.  When we want to add a
directory we don't know the nodes.  If we delay adding the directory
until the nodes are known we would have to store the entire checkout
somewhere else.

-- 
Philip