diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2011-02-17 21:07:24 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2011-02-17 21:07:24 +0000 |
commit | 99c0ab928a9247f7a61d1ee3912895978e106b37 (patch) | |
tree | 80d7ce36a45ba4d1a1ec87d991ccfcd571179407 | |
parent | db57d543e40dc988293ae43cd35ad9d685315203 (diff) |
Merged revision 1071790 from trunk:
Replicator database: add document ID to log message
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1071791 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/couchdb/couch_rep_db_listener.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/couchdb/couch_rep_db_listener.erl b/src/couchdb/couch_rep_db_listener.erl index 89a18e85..ef0ced0a 100644 --- a/src/couchdb/couch_rep_db_listener.erl +++ b/src/couchdb/couch_rep_db_listener.erl @@ -318,14 +318,14 @@ keep_retrying(Server, _RepId, RepDoc, _UserCtx, Error, _Wait, 0) -> 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]), |