couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1071791 - /couchdb/branches/1.1.x/src/couchdb/couch_rep_db_listener.erl
Date Thu, 17 Feb 2011 21:07:25 GMT
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]),



Mime
View raw message