You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:06:50 UTC
[16/50] git commit: Update db_to_seq table when _replicator db deleted
Update db_to_seq table when _replicator db deleted
If a _replicator db is deleted then recreated the db_to_seq ets
table needs to be updated, otherwise the sequence will be out of sync
and replication docs can fail to trigger.
BugzID: 12759
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/38c2f8b6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/38c2f8b6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/38c2f8b6
Branch: refs/heads/import
Commit: 38c2f8b666079b4c7029b7d20a63a1eca6c0ea88
Parents: daf662f
Author: Bob Dionne <bo...@cloudant.com>
Authored: Wed Aug 22 18:02:21 2012 -0400
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:38 2013 -0500
----------------------------------------------------------------------
src/couch_replicator_manager.erl | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/38c2f8b6/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index d31f0b9..b7e7d24 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -288,6 +288,13 @@ db_update_notifier() ->
_ ->
ok
end;
+ ({deleted, DbName}) ->
+ case IsReplicatorDbFun(DbName) of
+ true ->
+ ets:delete(?DB_TO_SEQ,DbName);
+ _ ->
+ ok
+ end;
(_) ->
ok
end