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

Re: Inexcusable BDB upgrade triple blunder

From: Branko Čibej <brane_at_xbc.nu>
Date: 2006-02-28 13:54:22 CET

Garrett Rooney wrote:
> On 2/27/06, Branko Čibej <brane@xbc.nu> wrote:
>
>
>> So ... any bright ideas?
>>
>
> How about the following hare-brained scheme:
>
> Have the BDB env handles and filesystem objects both store pointers to
> each other, so the first one that has a pool cleanup fire can NULL out
> the pointers that refer to it? That way the second one to fire can't
> get back to the free'd memory.
>
Ah, yes, you and Justin came up with the same idea.

Which reminds me that I forgot to mention a tiny detail: the relation
between svn_fs_t's and cached environments is many-to-one. IOW, I'd have
to put a dictionary of open handles into the descriptor. I'd also have
to add a validity check on the svn_fs_t's environment usage in _every_
BDB-related operation in the back-end. That's doable, but it's a mess,
and error-prone.

Another potential problem with this scheme is thread-safety; as long as
the descriptor only invalidates the svn_fs_t's handles during
apr_terminate, we can safely ignore that.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 28 13:59:28 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.