couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1036425 - /couchdb/trunk/src/couchdb/couch_rep_db_listener.erl
Date Thu, 18 Nov 2010 11:54:06 GMT
Author: fdmanana
Date: Thu Nov 18 11:54:05 2010
New Revision: 1036425

URL: http://svn.apache.org/viewvc?rev=1036425&view=rev
Log:
Replicator DB: added one more useful 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=1036425&r1=1036424&r2=1036425&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_db_listener.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_db_listener.erl Thu Nov 18 11:54:05 2010
@@ -228,10 +228,12 @@ start_replication({RepProps} = RepDoc, {
 maybe_stop_replication({RepProps}) ->
     DocId = couch_util:get_value(<<"_id">>, RepProps),
     case ets:lookup(?DOC_TO_REP_ID_MAP, DocId) of
-    [{DocId, RepId}] ->
+    [{DocId, {Base, Ext} = RepId}] ->
         couch_rep:end_replication(RepId),
         true = ets:delete(?REP_ID_TO_DOC_ID_MAP, RepId),
-        true = ets:delete(?DOC_TO_REP_ID_MAP, DocId);
+        true = ets:delete(?DOC_TO_REP_ID_MAP, DocId),
+        ?LOG_INFO("Stopped replication `~s` because replication document `~s`"
+            " was deleted", [Base ++ Ext, DocId]);
     [] ->
         ok
     end.



Mime
View raw message