You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2017/03/01 16:38:06 UTC

[32/43] couch-mrview commit: updated refs/heads/2971-count-distinct to f7c3c24

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/2971-count-distinct
Commit: f0f7d30014c8abdd2e232768d8b2b87183054770
Parents: 853c608
Author: ILYA Khlopotov <ii...@apache.org>
Authored: Wed Nov 2 16:44:22 2016 -0700
Committer: ILYA Khlopotov <ii...@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).