couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [1/2] couch-mrview commit: updated refs/heads/master to e875745
Date Wed, 02 Nov 2016 23:53:38 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master 853c60805 -> e875745af


exceeded_recompact_retry_count: add DbName/IdxName


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/f0f7d300
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/f0f7d300
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/f0f7d300

Branch: refs/heads/master
Commit: f0f7d30014c8abdd2e232768d8b2b87183054770
Parents: 853c608
Author: ILYA Khlopotov <iilyak@apache.org>
Authored: Wed Nov 2 16:44:22 2016 -0700
Committer: ILYA Khlopotov <iilyak@apache.org>
Committed: Wed Nov 2 16:44:22 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/f0f7d300/src/couch_mrview_compactor.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_compactor.erl b/src/couch_mrview_compactor.erl
index e343ac8..5957908 100644
--- a/src/couch_mrview_compactor.erl
+++ b/src/couch_mrview_compactor.erl
@@ -151,8 +151,9 @@ compact(State) ->
 recompact(State) ->
     recompact(State, recompact_retry_count()).
 
-recompact(_State, 0) ->
-    erlang:error(exceeded_recompact_retry_count);
+recompact(#mrst{db_name=DbName, idx_name=IdxName}, 0) ->
+    erlang:error({exceeded_recompact_retry_count,
+        [{db_name, DbName}, {idx_name, IdxName}]});
 
 recompact(State, RetryCount) ->
     Self = self(),
@@ -321,8 +322,10 @@ recompact_exceeded_retry_count() ->
             fun(_, _, _) ->
                 exit(error)
         end),
-        State = #mrst{fd=self()},
-        ?assertError(exceeded_recompact_retry_count, recompact(State)),
+        State = #mrst{fd=self(), db_name=foo, idx_name=bar},
+        ExpectedError = {exceeded_recompact_retry_count,
+            [{db_name, foo}, {idx_name, bar}]},
+        ?assertError(ExpectedError, recompact(State)),
         meck:unload(couch_index_updater)
     end).
 


Mime
View raw message