diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-17 11:42:32 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-17 11:42:32 +0000 |
commit | bc95f34a0cadbd4b470883fc61e12d5c448fc1ed (patch) | |
tree | deeb79d3fb7486526dc9af2fc9011be396f261b1 /src/couchdb | |
parent | e058233672db611c9046f1af69952d093db09606 (diff) |
Replicator DB: added 2 useful log messages.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1035987 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_rep_db_listener.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/couchdb/couch_rep_db_listener.erl b/src/couchdb/couch_rep_db_listener.erl index 926b2987..51b3bf68 100644 --- a/src/couchdb/couch_rep_db_listener.erl +++ b/src/couchdb/couch_rep_db_listener.erl @@ -198,16 +198,20 @@ maybe_start_replication({RepProps} = JsonRepDoc) -> spawn_link(fun() -> start_replication(JsonRepDoc, RepId, UserCtx) end); [{RepId, DocId}] -> ok; - [{RepId, _OtherDocId}] -> + [{RepId, OtherDocId}] -> + ?LOG_INFO("The replication specified by the document `~s` was already" + " triggered by the document `~s`", [DocId, OtherDocId]), couch_rep:update_rep_doc( JsonRepDoc, [{<<"replication_id">>, ?l2b(element(1, RepId))}] ) end. -start_replication(RepDoc, RepId, UserCtx) -> +start_replication({RepProps} = RepDoc, {Base, Ext} = RepId, UserCtx) -> case (catch couch_rep:start_replication(RepDoc, RepId, UserCtx)) of RepPid when is_pid(RepPid) -> + ?LOG_INFO("Document `~s` triggered replication `~s`", + [couch_util:get_value(<<"_id">>, RepProps), Base ++ Ext]), couch_rep:get_result(RepPid, RepId, RepDoc, UserCtx); Error -> couch_rep:update_rep_doc( |