diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2011-07-02 18:52:14 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2011-07-02 18:52:14 +0000 |
commit | 5caca0fdf68e8b345544ff74591df51da691de5e (patch) | |
tree | 9d7a7f87b7940d0085289ddf1ad88f23b2aa784a /src | |
parent | 7369394c77ac91b0edc0f885a6f96f5d9a27743e (diff) |
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).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1142263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_replication_manager.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/couchdb/couch_replication_manager.erl b/src/couchdb/couch_replication_manager.erl index 943cafa8..b3fc3e3c 100644 --- a/src/couchdb/couch_replication_manager.erl +++ b/src/couchdb/couch_replication_manager.erl @@ -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. |