Randall, I disagree with this change. While it's ok for local databases, it causes noise for remote databases, as the httpc pool is linked to the main replication gen_server and it starts receiving EXIT messages from the later when it finishes normally (without errors).
Look at the following gist, provided by Robert Dionne: https://gist.github.com/1022516 This is making the replication.js test failing for a few folks at least (Robert, Jan for e.g.) I would suggest instead this patch: http://friendpaste.com/2VZvViEvWugHt4TmHFep0M On Wed, Jun 8, 2011 at 10:30 PM, <[email protected]> wrote: > Author: randall > Date: Wed Jun 8 21:30:03 2011 > New Revision: 1133561 > > URL: http://svn.apache.org/viewvc?rev=1133561&view=rev > Log: > let dbs be closed implicitly when replication dies > > We have the supervision tree and monitoring set up with ref counter. > There's really no need to call close here and it generates log noise > when a user DELETEs a local DB involved in replication unless we track > what happened and doing some nil-ing or special casing. Just letting it > all be implicit seems easiest. Closes COUCHDB-863. > > Modified: > couchdb/trunk/src/couchdb/couch_replicator.erl > > Modified: couchdb/trunk/src/couchdb/couch_replicator.erl > URL: > http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_replicator.erl?rev=1133561&r1=1133560&r2=1133561&view=diff > ============================================================================== > --- couchdb/trunk/src/couchdb/couch_replicator.erl (original) > +++ couchdb/trunk/src/couchdb/couch_replicator.erl Wed Jun 8 21:30:03 2011 > @@ -478,9 +478,7 @@ terminate(Reason, State) -> > terminate_cleanup(State) -> > couch_task_status:update("Finishing"), > > stop_db_compaction_notifier(State#rep_state.source_db_compaction_notifier), > - > stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier), > - couch_api_wrap:db_close(State#rep_state.source), > - couch_api_wrap:db_close(State#rep_state.target). > + > stop_db_compaction_notifier(State#rep_state.target_db_compaction_notifier). > > > do_last_checkpoint(#rep_state{seqs_in_progress = [], > > > -- Filipe David Manana, [email protected], [email protected] "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."
