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 DD1A099FD for ; Mon, 20 Feb 2012 00:28:56 +0000 (UTC) Received: (qmail 99564 invoked by uid 500); 20 Feb 2012 00:28:56 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 99527 invoked by uid 500); 20 Feb 2012 00:28:56 -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 99506 invoked by uid 99); 20 Feb 2012 00:28:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 00:28:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2012 00:28:54 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9C3D31C09B1 for ; Mon, 20 Feb 2012 00:28:34 +0000 (UTC) Date: Mon, 20 Feb 2012 00:28:34 +0000 (UTC) From: "Filipe Manana (Updated) (JIRA)" To: dev@couchdb.apache.org Message-ID: <313694618.1279.1329697714641.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1217101725.54211.1329573302659.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (COUCHDB-1413) Reduce queries with ?inclusive_end=false and endkey/endkey_docid or startkey/startkey_docid (if ?descending=true) produce incorrect reductions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filipe Manana updated COUCHDB-1413: ----------------------------------- Attachment: 0001-Fix-fold-reduce-with-non-inclusive-end-key.patch > Reduce queries with ?inclusive_end=false and endkey/endkey_docid or startkey/startkey_docid (if ?descending=true) produce incorrect reductions > ---------------------------------------------------------------------------------------------------------------------------------------------- > > Key: COUCHDB-1413 > URL: https://issues.apache.org/jira/browse/COUCHDB-1413 > Project: CouchDB > Issue Type: Bug > Affects Versions: 1.1.1 > Reporter: Filipe Manana > Assignee: Filipe Manana > Fix For: 1.2.1 > > Attachments: 0001-Fix-fold-reduce-with-non-inclusive-end-key.patch, 0001-Fix-fold-reduce-with-non-inclusive-end-key.patch, COUCHDB-1413.sh > > > COUCHDB-1047 attempted to fix endkey being ignored for reduce queries. It works but it's busted when endkey_docid is also present, as it produces wrong results. Using end_key_gt as an endkey in the btree fold reduce operation is not enough to guarantee correct results for all cases. > The following script reproduces the issue and the following patch fixes it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira