diff options
author | Randall Leeds <randall@apache.org> | 2012-03-18 16:00:24 -0700 |
---|---|---|
committer | Randall Leeds <randall@apache.org> | 2012-10-25 09:41:53 -0700 |
commit | 10202bfe2b5e573598b7aa1a0cd7e02de13cf2a7 (patch) | |
tree | 9889d8fc2cf8e74ad7f3d6a166987dc4b5d9cb83 | |
parent | e896b0b70cc21d3a13b886ecd55732db3f247ac2 (diff) | |
download | couchdb-10202bfe2b5e573598b7aa1a0cd7e02de13cf2a7.tar.gz |
don't delete view groups that fail to open
...but log a message instead. Fixes COUCHDB-1445.
-rw-r--r-- | src/couch_mrview/src/couch_mrview_index.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/couch_mrview/src/couch_mrview_index.erl b/src/couch_mrview/src/couch_mrview_index.erl index a60465143..6bcb63f0e 100644 --- a/src/couch_mrview/src/couch_mrview_index.erl +++ b/src/couch_mrview/src/couch_mrview_index.erl @@ -18,7 +18,7 @@ -export([start_update/3, purge/4, process_doc/3, finish_update/1, commit/1]). -export([compact/3, swap_compacted/2]). - +-include("couch_db.hrl"). -include_lib("couch_mrview/include/couch_mrview.hrl"). @@ -88,8 +88,9 @@ open(Db, State) -> {ok, RefCounter} = couch_ref_counter:start([Fd]), {ok, NewSt#mrst{refc=RefCounter}} end; - Error -> - (catch couch_mrview_util:delete_files(DbName, Sig)), + {error, Reason} = Error -> + ?LOG_ERROR("Failed to open view file '~s': ~s", + [IndexFName, file:format_error(Reason)]), Error end. |