couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1071790 - /couchdb/trunk/src/couchdb/couch_rep_db_listener.erl
Date Thu, 17 Feb 2011 21:06:35 GMT
Author: fdmanana
Date: Thu Feb 17 21:06:35 2011
New Revision: 1071790

URL: http://svn.apache.org/viewvc?rev=1071790&view=rev
Log:
Replicator database: add document ID to log message

Modified:
    couchdb/trunk/src/couchdb/couch_rep_db_listener.erl

Modified: couchdb/trunk/src/couchdb/couch_rep_db_listener.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_db_listener.erl?rev=1071790&r1=1071789&r2=1071790&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_db_listener.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_db_listener.erl Thu Feb 17 21:06:35 2011
@@ -320,13 +320,13 @@ keep_retrying(Server, Rep, Error, _Wait,
     ok = gen_server:call(Server, {restart_failure, Rep, Error}, infinity);
 
 keep_retrying(Server, #rep{doc = {RepProps}} = Rep, Error, Wait, RetriesLeft) ->
-    ?LOG_ERROR("Error starting replication `~s`: ~p. "
-        "Retrying in ~p seconds", [pp_rep_id(Rep), Error, Wait]),
+    DocId = get_value(<<"_id">>, RepProps),
+    ?LOG_ERROR("Error starting replication `~s` (document `~s`): ~p. "
+        "Retrying in ~p seconds", [pp_rep_id(Rep), DocId, Error, Wait]),
     ok = timer:sleep(Wait * 1000),
     case (catch couch_replicator:async_replicate(Rep)) of
     {ok, _} ->
         ok = gen_server:call(Server, {triggered, Rep#rep.id}, infinity),
-        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