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

Re: [PATCH] abort_trail shouldn't destroy its pool

From: Jim Blandy <jimb_at_zwingli.cygnus.com>
Date: 2001-02-27 16:25:03 CET

Yoshiki Hayashi <yoshiki@xemacs.org> writes:
> trail->pool is not a subpool private to a trail. It should
> not be destroyed even txn_body failed. It can't be a
> subpool either, since functions like txn_body_begin_txn
> assumes trail->pool's life time is longer than trail itself.

Thanks for catching this bug!

In fact, trail->pool is supposed to be a subpool of the pool passed to
svn_fs__retry_txn. If the transaction aborts, then the subpool is
destroyed, undoing all the allocation that was made in the transaction
attempt. If the transaction succeeds, the subpool is simply left
alone; since nobody has any references to it any more, and it will be
freed when its parent pool is freed, the objects it contains are
effectively merged into the parent pool --- exactly the effect we want
for a successful transaction.

I've committed a fix. Let me know if I've missed something.
Received on Sat Oct 21 14:36:23 2006

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.