Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 84424 invoked from network); 5 Jul 2009 00:28:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jul 2009 00:28:21 -0000 Received: (qmail 61301 invoked by uid 500); 5 Jul 2009 00:28:31 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 61219 invoked by uid 500); 5 Jul 2009 00:28:30 -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 61208 invoked by uid 99); 5 Jul 2009 00:28:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jul 2009 00:28:30 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.210.204 as permitted sender) Received: from [209.85.210.204] (HELO mail-yx0-f204.google.com) (209.85.210.204) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jul 2009 00:28:22 +0000 Received: by yxe42 with SMTP id 42so1274774yxe.13 for ; Sat, 04 Jul 2009 17:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=DLtvpDlX7UOu7Z6+UVy0VJXI3qT47GiWQOKmt6pFxNU=; b=HxDXumjVw0NTnieksQi+qds0eRU1ZaOau63byZhOKmZn/hND/8yJvThBzbB3042Rkm mJkgjcsSWtAetoQVRrK4LRZWy668D8DiYAkjvB01KC1SEBRoHfhoJgzC3rAi60dNXh4U O0mLhExWOU7qppwVbpZcZjunxrcJSknpWgIwU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HGveLShy9GSbqj7i3XEP/O0DWv5jy98BBFWqfKLhsdN2x94LWnxgbtQeaKo3a4vafB eOHLQkKwFqMfdq+fLEQNg//YMaRv6tK4hEjfARYg9DFGsS8mZfv3lVAPZGHagygBcP36 k4GeqtsYggA44vxc2CEaLnehqL7qsAGAN6Lis= MIME-Version: 1.0 Received: by 10.100.42.4 with SMTP id p4mr5296681anp.115.1246753681791; Sat, 04 Jul 2009 17:28:01 -0700 (PDT) In-Reply-To: <4A4FF0E4.4040804@krampe.se> References: <4A4E7F53.7010406@krampe.se> <4A4FF0E4.4040804@krampe.se> Date: Sat, 4 Jul 2009 20:28:01 -0400 Message-ID: Subject: Re: Possible bug in indexer... (really) From: Paul Davis To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org G=F6ran, Are there links to your map/reduce functions along with some example data? If I get some time tonight or tomorrow I'll try and reproduce and see if I can't figure out what's going on. Like Adam says, it does seem like the flushing is getting overly aggressive when it shouldn't be. Paul 2009/7/4 G=F6ran Krampe : > Adam Kocoloski wrote: >> >> Not sure if it's described, but it is by design. =A0The reduce function >> executes when the btree is modified. =A0We can't afford to cache KVs fro= m an >> index update in memory regardless of size; we have to set some threshold >> when we flush them to disk. > > And I presume you can't write KVs *without* doing the reduce? > > When I wrote "described" I am referring to the blog post by Ricky Ho btw.= It > seems to imply a strict ordering, map -> reduce -> rereduce. IIRC. > >> I think the fundamental question is why the flush operations were >> occurring so frequently the second time around. =A0Is it because you wer= e >> building up a largish hash for the reduce value? =A0Probably. =A0Neverth= eless, >> I'd like to have a better handle on that. > > Yeah, well, I am on vacation now - but some other guys are not. We could = of > course start by trying to rewrite this the Right Way first as Chris said. > > I am curious if it can be done using grouping because we dismissed groupi= ng > due to its relatively slow performance (it runs lots of reduces at query > time IIRC) :) > > Btw, the solution used now DOES return the map for a full year in about 2= 30 > ms, including parsing on client side. So query time was perfectly fine, b= ut > view generation was not. This shows to me that it *can* work. > > regards, G=F6ran > >