couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1142263 - /couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl
Date Sat, 02 Jul 2011 18:52:14 GMT
Author: fdmanana
Date: Sat Jul  2 18:52:14 2011
New Revision: 1142263

URL: http://svn.apache.org/viewvc?rev=1142263&view=rev
Log:
Merged revision 1142262 from trunk

    On server startup, restart replications in error

    If we setup a continuous replication which goes into
    an error state and restart Couch just before the
    replication is retried (before it transitions to the
    triggered state), the user has to manually restart
    the replication (recreating the document or deleting      
    its _replication_state field).


Modified:
    couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl

Modified: couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl?rev=1142263&r1=1142262&r2=1142263&view=diff
==============================================================================
--- couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl (original)
+++ couchdb/branches/1.1.x/src/couchdb/couch_replication_manager.erl Sat Jul  2 18:52:14 2011
@@ -314,8 +314,13 @@ process_update(State, {Change}) ->
         <<"completed">> ->
             replication_complete(DocId),
             State;
-        _ ->
-            State
+        <<"error">> ->
+            case ets:lookup(?DOC_TO_REP, DocId) of
+            [] ->
+                maybe_start_replication(State, DocId, JsonRepDoc);
+            _ ->
+                State
+            end
         end
     end.
 



Mime
View raw message