Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 22851 invoked from network); 26 Aug 2010 13:41:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Aug 2010 13:41:32 -0000 Received: (qmail 44148 invoked by uid 500); 26 Aug 2010 13:41:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43681 invoked by uid 500); 26 Aug 2010 13:41:27 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43673 invoked by uid 99); 26 Aug 2010 13:41:26 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 13:41:26 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mrtrick@gmail.com designates 74.125.83.180 as permitted sender) Received: from [74.125.83.180] (HELO mail-pv0-f180.google.com) (74.125.83.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Aug 2010 13:41:01 +0000 Received: by pvc30 with SMTP id 30so1058081pvc.11 for ; Thu, 26 Aug 2010 06:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=ooFkAkZMIPTgau+Qn+b7LhtJt/ajvwgU5yZJAilXLdI=; b=fEXZDEcWbKhj4Ng8LBC39iKnXEGXrFr75iohXUksLv99+wKzMoSdvATprE+UqmM+Zn DR2Nl3uWr5DsBJ9jjBrxiOVU8OFe6/WTy0RTdexwXNhtY52SVJSRN8U+JWUhE9ZUEMwj t+70pOI5dMS8sfNF8avFMiEeXwBXKLsqrEEM8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=AHwtbqUJvOLiaTw/oulcRGXtlxPefQ8bVQBNRf8g4TLZL3NO19XbeOC5QJG1WLaxjU u4rMeiSs7qspN9EEnuWycqUNvTRAL4OqtP755RZ56UngYAc3XXxVY8IjvGhDaKU2Y9DV R8lGrq7hOwYd68JI5zpYAlSgCKZVMyIx2N8W8= Received: by 10.142.144.16 with SMTP id r16mr8361955wfd.91.1282830040427; Thu, 26 Aug 2010 06:40:40 -0700 (PDT) Received: from [192.168.1.99] (210-84-9-4.dyn.iinet.net.au [210.84.9.4]) by mx.google.com with ESMTPS id n2sm2994109wfl.13.2010.08.26.06.40.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Aug 2010 06:40:39 -0700 (PDT) Message-ID: <4C766ECA.1090100@gmail.com> Date: Thu, 26 Aug 2010 23:40:26 +1000 From: Patrick Barnes User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Seamless view rebuilding? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I have a database serving documents through a number of intermediary application servers, to the users' web browsers. There are two mechanisms by which documents are modified; a) Piecemeal updates as a result of user actions. (ie adding or updating a record) b) Bulk updates, typically from import scripts, that might modify tens of thousands of documents at once. The problem I'm having, is that when a set of bulk updates go through, it can take a long time to rebuild the view indexes. Meanwhile, several user's web requests will time out until rebuilding is complete. Stale=ok is a simple solution to the bulk problem, but the application servers will also expect to be able to update documents, and retrieve the changes immediately after. Is there a good way to avoid these large view update delays? -Patrick Barnes