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 086C39585 for ; Fri, 11 May 2012 13:35:02 +0000 (UTC) Received: (qmail 61186 invoked by uid 500); 11 May 2012 13:35:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 61146 invoked by uid 500); 11 May 2012 13:35:01 -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 61137 invoked by uid 99); 11 May 2012 13:35:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 13:35:01 +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 (nike.apache.org: domain of djc.ochtman@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 13:34:53 +0000 Received: by wibhn14 with SMTP id hn14so1301859wib.5 for ; Fri, 11 May 2012 06:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=TYDzvFV+w4Il1j0cXexZqLeeSqPdzCi+xwMinJ5qHWA=; b=pIJyHw8Szd9KcLLKNRCBiB6Xp8vf4PzvQHfr/nd65FSnMaosgN5FcnFlz6XXoKNQA/ gpX1E1pedMZEFLktROV+CG841sLQl33cm10qK1HkTVxzbnosyc6ukRrDv20USjPs9Nw9 WsWediN17FTvBa1WI0hFCOdH1K2Uc7CEggw0aSEGpR06R1qYcnD7omaOosCd3gdQg7S+ l00AhCr8knw85q41ibBWQ0A1cQz9K3UEMN/jDomjefhZaumBG9f7Idkz1Oi+9URflWhP 2gh7kPUQ9SK99ktlbGj5kYUv8IBzVSXRj239TRZ/pEfkKtL4Ya7x7Yi9652imLx2A/79 UQ0A== Received: by 10.216.27.200 with SMTP id e50mr1557106wea.23.1336743272920; Fri, 11 May 2012 06:34:32 -0700 (PDT) MIME-Version: 1.0 Sender: djc.ochtman@gmail.com Received: by 10.216.137.162 with HTTP; Fri, 11 May 2012 06:34:12 -0700 (PDT) In-Reply-To: References: From: Dirkjan Ochtman Date: Fri, 11 May 2012 15:34:12 +0200 X-Google-Sender-Auth: pu2rpOxmHL-otl5x0p_wh_NlCzc Message-ID: Subject: Re: Post-mortem To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 On Fri, May 11, 2012 at 3:25 PM, Robert Newson wrote: > We're veering off-topic here, but there are several remaining issues. > First is that the view file is at some update_seq relative to the > database file. Being at update_seq N for a view means it has all the > changes up to and including N, but nothing after N, so while those > updates could be processed in parallel, they'd have to be applied to > the view process and view file in order. Yeah, you'd have to serialize and buffer when writing to disk again. > Secondly, and more > importantly, is how to handle rows that, for whatever reason, cause an > exception when evaluated in the function (e.g, the common case where > there's an undefined property and no guard clause). If the order is > not determined, then two database, with the same data and same view > code, will have different view results for the same input. I'm actually not clear on what happens with erroring view functions. Does it just stop processing any further document revisions? In any case, it seems okayish to do have the document updates be in a defined ordering but parallellize execution of the view function, then serialize back into document order when the results come back, doing a little buffering if the results aren't in order. Cheers, Dirkjan