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

Re: Mergeinfo.db file kept open by apache after sql error

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2007-08-30 07:03:40 CEST

On Aug 29, 2007, at 1:36 AM, Daniel Rall wrote:

>
> On Aug 28, 2007, at 4:39 AM, Lieven Govaerts wrote:
>
>> Quoting Daniel Rall <dlr@finemaltcoding.com>:
>>
>>>
>>> On Aug 26, 2007, at 1:05 AM, Lieven Govaerts wrote:
>> ..
>>>> In mergeinfo-sqlite-index.c/svn_fs_mergeinfo__get_mergeinfo(), but
>>>> also
>>>> in svn_fs_mergeinfo__update_index and
>>>> svn_fs_mergeinfo__get_mergeinfo_for_tree the call to
>>>> sqlite3_close is
>>>> not in the 'finally' path (in java terms), so whenever there's an
>>>> error
>>>> accessing the database it's not closed correctly.
>>>>
>>>> Does this make sense?
>>>
>>> Thanks for the report, Lieven. I've added some simple error
>>> handling
>>> improvements in r26340 which fix this problem.
>>
>> That should do it. One small remark: What do you think of renaming
>> the
>> MAYBE_CLEANUP macro to CLEANUP_ON_ERROR, extending it
>> to take the 'err' variable as parameter and move to a
>> common include file so we can use it throughout whole the code?
>> I've found
>> hundreds of instances where we use this pattern, might as well
>> make it more
>> standard.
>
> That's not a bad idea -- I cribbed the pattern from libsvn_wc. I
> guess this would live in a header file under include/private/?

Were you thinking of something like the attached patch, or perhaps
with a set of macros corresponding to each common label name (e.g.
error, cleanup, done)?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Aug 30 06:54:11 2007

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