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 Thu, 25 Oct 2012 16:43:48 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/10202bfe
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/10202bfe
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/10202bfe

Branch: refs/heads/master
Commit: 10202bfe2b5e573598b7aa1a0cd7e02de13cf2a7
Parents: e896b0b
Author: Randall Leeds <randall@apache.org>
Authored: Sun Mar 18 16:00:24 2012 -0700
Committer: Randall Leeds <randall@apache.org>
Committed: Thu Oct 25 09:41:53 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/10202bfe/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