Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BFD68671 for ; Wed, 10 Aug 2011 21:51:40 +0000 (UTC) Received: (qmail 81949 invoked by uid 500); 10 Aug 2011 21:51:39 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 81882 invoked by uid 500); 10 Aug 2011 21:51:39 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 81874 invoked by uid 99); 10 Aug 2011 21:51:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 21:51:38 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fdmanana@gmail.com designates 209.85.218.52 as permitted sender) Received: from [209.85.218.52] (HELO mail-yi0-f52.google.com) (209.85.218.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2011 21:51:31 +0000 Received: by mail-yi0-f52.google.com with SMTP id 13so1447738yie.11 for ; Wed, 10 Aug 2011 14:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=8gDcq7cHVlQsfbKjRV36FN1awNvhgjcSe3OZLvKWArA=; b=UD6K4Va4Uef+gDnRodzWXLD/zP5S5IKdTTC9Fog4hsvAgHmfcmMDh9WDVGQLHZLf9j QoRErlp9ra6NvJPhZOW/gQILcK6U2Kv/ULyP1dWsKBdwz8tOh9wVK0uE6FjJAZ42sinQ NGvqKgsaDUnSjGXwOFBlh/gDbV5eaa8J6dTV8= MIME-Version: 1.0 Received: by 10.142.110.5 with SMTP id i5mr941557wfc.389.1313013069992; Wed, 10 Aug 2011 14:51:09 -0700 (PDT) Sender: fdmanana@gmail.com Received: by 10.68.48.72 with HTTP; Wed, 10 Aug 2011 14:51:09 -0700 (PDT) In-Reply-To: <20110810214921.4AE3523889C5@eris.apache.org> References: <20110810214921.4AE3523889C5@eris.apache.org> Date: Wed, 10 Aug 2011 14:51:09 -0700 X-Google-Sender-Auth: XEnRhP36j4vgmNwBSRbFRcyfHl8 Message-ID: Subject: Re: svn commit: r1156381 - /couchdb/trunk/src/couchdb/couch_server.erl From: Filipe David Manana To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Forgot to mention, this issue was actually not happening in any Apache CouchDB release. Apologies for the confusion. I'll update the comment. On Wed, Aug 10, 2011 at 2:49 PM, wrote: > Author: fdmanana > Date: Wed Aug 10 21:49:20 2011 > New Revision: 1156381 > > URL: http://svn.apache.org/viewvc?rev=3D1156381&view=3Drev > Log: > Revert couch_server changes added in revision 1156360 > > Leaving the tests however since it doesn't hurt. > > Modified: > =C2=A0 =C2=A0couchdb/trunk/src/couchdb/couch_server.erl > > Modified: couchdb/trunk/src/couchdb/couch_server.erl > URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_server.= erl?rev=3D1156381&r1=3D1156380&r2=3D1156381&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- couchdb/trunk/src/couchdb/couch_server.erl (original) > +++ couchdb/trunk/src/couchdb/couch_server.erl Wed Aug 10 21:49:20 2011 > @@ -316,13 +316,11 @@ handle_call({open, DbName, Options}, {Fr > =C2=A0 =C2=A0 =C2=A0 =C2=A0 {reply, couch_db:open_ref_counted(MainPid, Fr= omPid), Server} > =C2=A0 =C2=A0 end; > =C2=A0handle_call({create, DbName, Options}, From, Server) -> > - =C2=A0 =C2=A0FileName =3D get_full_filename(Server, ?b2l(DbName)), > - =C2=A0 =C2=A0case file:open(FileName, [read]) of > - =C2=A0 =C2=A0{ok, Fd} -> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0ok =3D file:close(Fd), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0{reply, file_exists, Server}; > - =C2=A0 =C2=A0Error -> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0open_db(DbName, Server, [create | Options], = From) > + =C2=A0 =C2=A0case ets:lookup(couch_dbs_by_name, DbName) of > + =C2=A0 =C2=A0[] -> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0open_db(DbName, Server, [create | Options], = From); > + =C2=A0 =C2=A0[_AlreadyRunningDb] -> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0{reply, file_exists, Server} > =C2=A0 =C2=A0 end; > =C2=A0handle_call({delete, DbName, _Options}, _From, Server) -> > =C2=A0 =C2=A0 DbNameList =3D binary_to_list(DbName), > > > --=20 Filipe David Manana, fdmanana@gmail.com, fdmanana@apache.org "Reasonable men adapt themselves to the world. =C2=A0Unreasonable men adapt the world to themselves. =C2=A0That's why all progress depends on unreasonable men."