Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 76672 invoked from network); 28 Mar 2011 11:10:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Mar 2011 11:10:38 -0000 Received: (qmail 97280 invoked by uid 500); 28 Mar 2011 11:10:38 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 97245 invoked by uid 500); 28 Mar 2011 11:10:38 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 97238 invoked by uid 99); 28 Mar 2011 11:10:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 11:10:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Mar 2011 11:10:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E7D3E23889E2; Mon, 28 Mar 2011 11:10:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1086186 - /couchdb/branches/1.1.x/src/couchdb/couch_rep.erl Date: Mon, 28 Mar 2011 11:10:16 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110328111016.E7D3E23889E2@eris.apache.org> Author: fdmanana Date: Mon Mar 28 11:10:16 2011 New Revision: 1086186 URL: http://svn.apache.org/viewvc?rev=1086186&view=rev Log: Backport fix from revision 1086185 Replicator: fix error when restarting replications in OTP R14B02 This is a workaround for a change introduced in OTP R14B02 to the supervisor module. There's an erlang-bugs thread about this issue: http://erlang.org/pipermail/erlang-bugs/2011-March/002273.html Modified: couchdb/branches/1.1.x/src/couchdb/couch_rep.erl Modified: couchdb/branches/1.1.x/src/couchdb/couch_rep.erl URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_rep.erl?rev=1086186&r1=1086185&r2=1086186&view=diff ============================================================================== --- couchdb/branches/1.1.x/src/couchdb/couch_rep.erl (original) +++ couchdb/branches/1.1.x/src/couchdb/couch_rep.erl Mon Mar 28 11:10:16 2011 @@ -315,7 +315,14 @@ start_replication_server(Replicator) -> throw({db_not_found, <<"could not open ", DbUrl/binary>>}); {error, {unauthorized, DbUrl}} -> throw({unauthorized, - <<"unauthorized to access database ", DbUrl/binary>>}) + <<"unauthorized to access database ", DbUrl/binary>>}); + {error, {'EXIT', {badarg, + [{erlang, apply, [gen_server, start_link, undefined]} | _]}}} -> + % Clause to deal with a change in the supervisor module introduced + % in R14B02. For more details consult the thread at: + % http://erlang.org/pipermail/erlang-bugs/2011-March/002273.html + _ = supervisor:delete_child(couch_rep_sup, RepId), + start_replication_server(Replicator) end; {error, {already_started, Pid}} -> ?LOG_DEBUG("replication ~p already running at ~p", [RepId, Pid]),