couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: server crash when compacting empty database
Date Tue, 24 Mar 2009 23:58:59 GMT

On 25 Mar 2009, at 00:08, Jan Lehnardt wrote:

> Hi Wout,
>
> good find! I'd say it is an API misuse at this point, but of course,
> CouchDB should handle this more gracefully.
>
> The patch below fixes the problem fairly high up in the db_updater
> module. The actual fix might has to go into the start_copy_compact/1
> function, but I'd rather leave this for Damien.
>
> Also, this is not a blocker for 0.9 :)
>
> Wout, if this is still open tomorrow, can you file a bug?

fixed as of r 758093

Cheers
Jan
--

>
> Cheers
> Jan
> --
>
> Index: /Users/jan/Work/couchdb/trunk/src/couchdb/couch_db_updater.erl
> ===================================================================
> --- /Users/jan/Work/couchdb/trunk/src/couchdb/couch_db_updater.erl	 
> (revision 757850)
> +++ /Users/jan/Work/couchdb/trunk/src/couchdb/couch_db_updater.erl	 
> (working copy)
> @@ -139,6 +139,9 @@
>     {reply, {ok, Db2#db.update_seq, IdRevsPurged}, Db2}.
>
>
> +handle_cast(start_compact, #db{update_seq=Seq}=Db) when Seq =:= 0 ->
> +    % do not attemt to compact empty dbs
> +    {noreply, Db};
> handle_cast(start_compact, Db) ->
>     case Db#db.compactor_pid of
>     nil ->
>
>
> On 24 Mar 2009, at 23:26, Wout Mertens wrote:
>
>> Hi,
>>
>> try this on latest trunk (and several before that I think):
>>
>> 1. Create an empty database
>> 2. Compact it
>>
>> Result => lots of ugly backtraces from couchdb.
>>
>> Is this a bug or a misfeature? Should I file a bug, if so, what  
>> info should I give?
>>
>> Cheers,
>>
>> Wout.
>>
>
>


Mime
View raw message