couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Chesneau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2049) latency in creation wit a quick deletion crash couch_index_server
Date Thu, 06 Feb 2014 09:08:10 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893191#comment-13893191
] 

Benoit Chesneau commented on COUCHDB-2049:
------------------------------------------

well I was specifically talking about handling the "db not found" error more gracefully. So
it doesn't crach the couch_index_server. Which can be a problem since the number of restarts
are limited.

Thanks for the hints, I will see if I could come with a patch later in the day.

> latency in creation wit a quick deletion crash couch_index_server
> -----------------------------------------------------------------
>
>                 Key: COUCHDB-2049
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2049
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Benoit Chesneau
>
> When you quickly start to refresh an index:
> {code}
> refresh(#db{name=DbName}, DDoc) ->
>     refresh(DbName, DDoc);
> refresh(Db, DDoc) ->
>     UpdateSeq = couch_util:with_db(Db, fun(WDb) ->
>                     couch_db:get_update_seq(WDb)
>             end),
>     case couch_index_server:get_index(couch_mrview_index, Db, DDoc) of
>         {ok, Pid} ->
>             case catch couch_index:get_state(Pid, UpdateSeq) of
>                 {ok, _} -> ok;
>                 Error -> {error, Error}
>             end;
>         Error ->
>             {error, Error}
>     end.
> {code}
> and immediately delete the database it trigger the following error:
> {code}
> [error] [<0.184.0>] Could not open file /Users/benoitc/refuge/couchdb/test/etap/../../test/out/data/foo.couch:
no such file or directory
> [info] [<0.167.0>] Closing index for db: foo idx: _design/bar sig: "6551000fd7a75dab3f60065ce1308dbe"
> reason: {bad_return_value,{not_found,no_db_file}}
> [error] [<0.167.0>] ** Generic server <0.167.0> terminating 
> ** Last message in was commit
> ** When Server state == {st,couch_mrview_index,
> {code}
> which is received by the couch_index_server and crash it.. Shouldn't the crash in couch_index
be ignored at that point? 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message