couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rand...@apache.org
Subject [2/4] git commit: don't delete view groups that fail to open
Date Wed, 10 Oct 2012 23:13:50 GMT
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/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f79591d7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f79591d7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f79591d7

Branch: refs/heads/hotfixes1.2
Commit: f79591d73c7fa02f2938875bceac691703938f81
Parents: 205ccb0
Author: Randall Leeds <randall@apache.org>
Authored: Sun Mar 18 16:00:24 2012 -0700
Committer: Randall Leeds <randall@apache.org>
Committed: Wed Oct 10 15:39:58 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f79591d7/src/couch_mrview/src/couch_mrview_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview/src/couch_mrview_index.erl b/src/couch_mrview/src/couch_mrview_index.erl
index a604651..6bcb63f 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.
 


Mime
View raw message