You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:10:14 UTC

[29/49] git commit: don't delete view groups that fail to open

don't delete view groups that fail to open

...but log a message instead. Fixes COUCHDB-1445.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/43590d89
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/43590d89
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/43590d89

Branch: refs/heads/import
Commit: 43590d89e9eabff22402d99ede5df66a32c47261
Parents: cda6f2f
Author: Randall Leeds <ra...@apache.org>
Authored: Sun Mar 18 16:00:24 2012 -0700
Committer: Randall Leeds <ra...@apache.org>
Committed: Thu Oct 25 09:41:53 2012 -0700

----------------------------------------------------------------------
 src/couch_mrview_index.erl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/43590d89/src/couch_mrview_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_index.erl b/src/couch_mrview_index.erl
index a604651..6bcb63f 100644
--- a/src/couch_mrview_index.erl
+++ b/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.