You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fd...@apache.org on 2011/02/17 22:07:25 UTC

svn commit: r1071791 - /couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl

Author: fdmanana
Date: Thu Feb 17 21:07:24 2011
New Revision: 1071791

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

Replicator database: add document ID to log message

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

Modified: couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl?rev=1071791&r1=1071790&r2=1071791&view=diff
==============================================================================
--- couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl (original)
+++ couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl Thu Feb 17 21:07:24 2011
@@ -318,14 +318,14 @@ keep_retrying(Server, _RepId, RepDoc, _U
     ok = gen_server:call(Server, {restart_failure, RepDoc, Error}, infinity);
 
 keep_retrying(Server, RepId, RepDoc, UserCtx, Error, Wait, RetriesLeft) ->
-    ?LOG_ERROR("Error starting replication `~s`: ~p. "
-        "Retrying in ~p seconds", [pp_rep_id(RepId), Error, Wait]),
+    {RepProps} = RepDoc,
+    DocId = get_value(<<"_id">>, RepProps),
+    ?LOG_ERROR("Error starting replication `~s` (document `~s`): ~p. "
+        "Retrying in ~p seconds", [pp_rep_id(RepId), DocId, Error, Wait]),
     ok = timer:sleep(Wait * 1000),
     case (catch couch_rep:start_replication(RepDoc, RepId, UserCtx)) of
     Pid when is_pid(Pid) ->
         ok = gen_server:call(Server, {triggered, RepId}, infinity),
-        {RepProps} = RepDoc,
-        DocId = get_value(<<"_id">>, RepProps),
         [{DocId, {RepId, MaxRetries}}] = ets:lookup(?DOC_ID_TO_REP_ID, DocId),
         ?LOG_INFO("Document `~s` triggered replication `~s` after ~p attempts",
             [DocId, pp_rep_id(RepId), MaxRetries - RetriesLeft + 1]),