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 50342C681 for ; Tue, 1 May 2012 15:00:46 +0000 (UTC) Received: (qmail 86984 invoked by uid 500); 1 May 2012 15:00:45 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 86929 invoked by uid 500); 1 May 2012 15:00:45 -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 86917 invoked by uid 99); 1 May 2012 15:00:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 15:00:45 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of djc.ochtman@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2012 15:00:39 +0000 Received: by werf3 with SMTP id f3so3359009wer.11 for ; Tue, 01 May 2012 08:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=QLVQcwUEMQEa/SlnYsEJ0yZGJHmRRwwp41K3qd8FOaY=; b=AsjfEa2AXoq75Z5tp87pV2mW3zll/ACt4fe/y6o+B+YoyQ1LIx0g8i/97h8eMsUfbr n8RUfE6bR3M0BRmTnkmxn2ZlsJ5HQQyk27HXvKC4rt0a6hB1pIy2b1GpQhsl2quRnsHb fQZsTpkeA/RW/YLw4SUVTLgz+0xYMwa2N8sCB2R09WH1Q4lXekmHZMU19Q6e6/cULYNj h2SQuNfrfge1nFkM1K9aIe1FJq5qworDAQ84HAGUUrbVx2nFQPT0fOGjN8lNSwnyys89 pickmSRjc4HpOMPxx+ZIIPA/sVcy64XgL1yWV7jQb+9N0Y5tdyfcZTiOAA/qjUsC75EH erww== Received: by 10.180.102.3 with SMTP id fk3mr5892369wib.9.1335884418244; Tue, 01 May 2012 08:00:18 -0700 (PDT) MIME-Version: 1.0 Sender: djc.ochtman@gmail.com Received: by 10.216.137.162 with HTTP; Tue, 1 May 2012 07:59:58 -0700 (PDT) From: Dirkjan Ochtman Date: Tue, 1 May 2012 16:59:58 +0200 X-Google-Sender-Auth: Z2-T5tC99jy6XEnO61Cwge4xbA0 Message-ID: Subject: A slightly crazy idea? To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, It seems like view indexing gets hit for one of two reasons: 1. There are new documents (or document revisions) to index 2. The design document has been updated Currently, for both cases, the default is to have the view wait until after all documents (revisions) have been indexed using the latest design doc contents before returning results. I was wondering if it might be sensible to keep the indexing the same for the first case, but default to returning stale results (possibly including using the previous design doc to index the new documents/revisions) and kick off a process to regenerate results with the new design doc (update_after-like). There could be a negative value for stale= to indicate that the view should wait (i.e. stale=wait). Rationale: I usually want to wait for indexing new revisions, because we don't generally add revisions at high speed. However, old views have generally worked fine for a long time, and it's annoying when many parts of my app have to wait for the index to regenerate. Does that make sense? Alternatively, are there other ways to attack this issue? Maybe I could copy my design doc, update it, hit it, then move it to the old name when it's done? If that works, perhaps Futon could make that easier? Cheers, Dirkjan