RE: svn commit: r1555350-/subversion/trunk/subversion/libsvn_client/mtcc.c
From: Bert Huijben <bert_at_qqmail.nl>
Date: Sat, 4 Jan 2014 23:51:33 +0100
There are more users of the commit logic than just our command line tools and libsvn client.
The Ra API is a public API that can't just be broken for nicer logic in the Fs layer. Mucc is just another driver of the Ra commit logic.
If we have to revert something it would have to be the added pool requirements for 1.9. We can't change requirements for 1.0 APIs.
The mtcc code opens a commit editor and drives it to completion. There are no documented pool rules for that in 1.0-1.8. We need a time machine to change those rules or strict erata documenting what every API user should change. I see none of those for 1.9 yet?
Your patch doesn't even document what the real problem is that you fix. You are just shifting fsfs or fsx problems towards API users.
Without proper documentation this kind of requirement changes belong in a 2.0 release, not hidden without any documentation in a 1.9 or 1.10 release.
As is the cache logic is flawed if it has all these new pool usage requirements that we have to apply all through our code. (Not just here but svnserve and a few other applications were changed for similar things)
Bert
-----Original Message-----
On Sat, Jan 4, 2014 at 9:47 PM, Bert Huijben <bert_at_qqmail.nl> wrote:
You only know this for the success path. The fs api should hide these details..
With all due respect, the fault is svn_client_mtcc_commit
destroying mtcc->pool before destroying mtcc itself (via
its owning pool). Hence, the caller has no control over pool
There is no way we can document these guarantees for public APIs and really assume that all existing and future users follow all these new requirements for a new Fs layer cache.
We had similar caches in the past, but hid the ugly details by installing cleanup handlers...
We should really look at this well before 1.9, as adding such requirements is a breaking change. And the commit API already existed since well before 1.0 without these pool requirements. Strict dual pools are only common since 1.7, but especially generated bindings (like swig) have strange pool handling much longer.
to standard pool handling by destroying the mtcc with its
-- Stefan^2.
From: stefan2_at_apache.org
Author: stefan2
URL: http://svn.apache.org/r1555350
* subversion/libsvn_client/mtcc.c
Modified:
Modified: subversion/trunk/subversion/libsvn_client/mtcc.c
+ /* Beware that the editor object must not live longer than the MTCC.
err = editor->open_root(edit_baton, mtcc->base_revision, scratch_pool, &root_baton);
|
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.