You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2014/02/05 12:20:09 UTC

[jira] [Created] (COUCHDB-2049) latency in creation wit a quick deletion crash couch_index_server

Benoit Chesneau created COUCHDB-2049:
----------------------------------------

             Summary: 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:erlang}
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:

[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,

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)