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 4D271481E for ; Wed, 29 Jun 2011 16:08:30 +0000 (UTC) Received: (qmail 55173 invoked by uid 500); 29 Jun 2011 16:08:29 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 55076 invoked by uid 500); 29 Jun 2011 16:08:29 -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 55066 invoked by uid 99); 29 Jun 2011 16:08:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 16:08:28 +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 (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 16:08:24 +0000 Received: by vws16 with SMTP id 16so1461957vws.11 for ; Wed, 29 Jun 2011 09:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=xqFaDgcXMNNtYtcJrhse1BkNw368JOhHm0sSYSrz/sg=; b=bbZgFN02u8n4NQS7+ugorY2EOY8biQC4bNbclciJm8E3woVjxU0sRCdFHP9z1Rqf+Z 2PT2MjaujWYzL4O2jxW4mSaT8DzfbWEUA6qqDUwTRPmntzPqZtBewjTYPG9pVBo2a9tM 1TvB6wkkGh2hVdwRPnFUgf9I6996CSBWYOeAw= Received: by 10.52.175.36 with SMTP id bx4mr1382400vdc.21.1309363683097; Wed, 29 Jun 2011 09:08:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.162.168 with HTTP; Wed, 29 Jun 2011 09:07:23 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Wed, 29 Jun 2011 12:07:23 -0400 Message-ID: Subject: Re: waitForRestart() double request() To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jun 29, 2011 at 9:45 AM, Jan Lehnardt wrote: > Heya, > > I may be missing something, but our weitForRestart() function seems to ha= ve an accidental line duplication: > > function waitForRestart() { > =A0var waiting =3D true; > =A0while (waiting) { > =A0 =A0try { > =A0 =A0 =A0CouchDB.request("GET", "/"); > =A0 =A0 =A0CouchDB.request("GET", "/"); > =A0 =A0 =A0waiting =3D false; > =A0 =A0} catch(e) { > =A0 =A0 =A0// the request will fail until restart completes > =A0 =A0} > =A0} > }; > > If this is intentional, I'd like to know what the intent here is :) > > Cheers > Jan > -- > > Someone's sick idea of a sleep statement? FWIW, it's been doubled up since it was committed a long time ago: https://github.com/apache/couchdb/commit/ed7e7c686fae7f1d2e3f149c2f2ed8854c= 4f95c8#L0R152