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 A8D7ECD30 for ; Fri, 11 May 2012 13:25:15 +0000 (UTC) Received: (qmail 24852 invoked by uid 500); 11 May 2012 13:25:15 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 24810 invoked by uid 500); 11 May 2012 13:25:15 -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 24802 invoked by uid 99); 11 May 2012 13:25:15 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 13:25:15 +0000 Received: from localhost (HELO mail-qa0-f45.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 May 2012 13:25:14 +0000 Received: by qaeb19 with SMTP id b19so1446356qae.11 for ; Fri, 11 May 2012 06:25:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.157.138 with SMTP id wm10mr1620141igb.65.1336742713720; Fri, 11 May 2012 06:25:13 -0700 (PDT) Received: by 10.42.110.76 with HTTP; Fri, 11 May 2012 06:25:13 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 May 2012 14:25:13 +0100 Message-ID: Subject: Re: Post-mortem From: Robert Newson To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 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. 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 not saying it's insoluble, only that it's not as simple as it might appear at first (or second) glance. B. On 11 May 2012 14:04, Dirkjan Ochtman wrote: > On Fri, May 11, 2012 at 2:44 PM, Robert Newson wrote: >> Fundamentally, the issue is that updating a view is processing an >> incoming, ordered list of changes, there's not much parallelism to be >> had there. > > Why is that? I don't see how the list of changes is ordered. ISTM that > updated documents may be passed to the view indexer in any order, > which is why M/R works. If that's true and computing keys and values > is CPU-bound, parallelizing running the view function on the updated > documents shouldn't be that hard. > > Cheers, > > Dirkjan