couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbast...@apache.org
Subject [4/5] couch-replicator commit: updated refs/heads/master to c9184cf
Date Fri, 31 Oct 2014 19:53:13 GMT
fix view changes with multiple keys

Conflicts:
	rebar.config
	src/couch_replicator.erl


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

Branch: refs/heads/master
Commit: a85c7c4aea154ccc52a7f36a3c0118c0b8b1d07b
Parents: 7390c7e
Author: benoitc <bchesneau@gmail.com>
Authored: Tue Oct 14 14:15:47 2014 +0200
Committer: Benjamin Bastian <benjamin.bastian@gmail.com>
Committed: Thu Oct 30 13:29:56 2014 -0700

----------------------------------------------------------------------
 src/couch_replicator.erl | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/a85c7c4a/src/couch_replicator.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator.erl b/src/couch_replicator.erl
index 6992fff..3356609 100644
--- a/src/couch_replicator.erl
+++ b/src/couch_replicator.erl
@@ -488,18 +488,6 @@ terminate(shutdown, #rep_state{rep_details = #rep{id = RepId}} = State)
->
     couch_replicator_notifier:notify({error, RepId, <<"cancelled">>}),
     terminate_cleanup(State);
 
-terminate(Reason, #rep_state{} = State) ->
-    #rep_state{
-        source_name = Source,
-        target_name = Target,
-        rep_details = #rep{id = {BaseId, Ext} = RepId} = Rep
-    } = State,
-    couch_log:error("Replication `~s` (`~s` -> `~s`) failed: ~s",
-        [BaseId ++ Ext, Source, Target, to_binary(Reason)]),
-    terminate_cleanup(State),
-    couch_replicator_notifier:notify({error, RepId, Reason}),
-    couch_replicator_manager:replication_error(Rep, Reason);
-
 terminate(shutdown, {error, Class, Error, Stack, InitArgs}) ->
     #rep{id=RepId} = InitArgs,
     couch_stats:increment_counter([couch_replicator, failed_starts]),
@@ -514,7 +502,18 @@ terminate(shutdown, {error, Class, Error, Stack, InitArgs}) ->
         NotifyError = Error
     end,
     couch_replicator_notifier:notify({error, RepId, NotifyError}),
-    couch_replicator_manager:replication_error(InitArgs, NotifyError).
+    couch_replicator_manager:replication_error(InitArgs, NotifyError);
+terminate(Reason, State) ->
+    #rep_state{
+        source_name = Source,
+        target_name = Target,
+        rep_details = #rep{id = {BaseId, Ext} = RepId} = Rep
+    } = State,
+    couch_log:error("Replication `~s` (`~s` -> `~s`) failed: ~s",
+        [BaseId ++ Ext, Source, Target, to_binary(Reason)]),
+    terminate_cleanup(State),
+    couch_replicator_notifier:notify({error, RepId, Reason}),
+    couch_replicator_manager:replication_error(Rep, Reason).
 
 terminate_cleanup(State) ->
     update_task(State),


Mime
View raw message