Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 50974 invoked from network); 20 Feb 2011 21:05:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Feb 2011 21:05:03 -0000 Received: (qmail 67983 invoked by uid 500); 20 Feb 2011 21:05:02 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 67824 invoked by uid 500); 20 Feb 2011 21:05:02 -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 67816 invoked by uid 99); 20 Feb 2011 21:05:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Feb 2011 21:05:01 +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; Sun, 20 Feb 2011 21:04:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AF7E11AF7B1 for ; Sun, 20 Feb 2011 21:04:38 +0000 (UTC) Date: Sun, 20 Feb 2011 21:04:38 +0000 (UTC) From: "Bob Dionne (JIRA)" To: dev@couchdb.apache.org Message-ID: <1105286308.4835.1298235878715.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (COUCHDB-462) track conflict count in db_info (was built-in conflicts view) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997217#comment-12997217 ] Bob Dionne commented on COUCHDB-462: ------------------------------------ I started reworking couch_key_tree[1] as suggested, to try and tease out some fold style functions. This should probably be done in COUCHDB-988 but I wanted to use has_conflicts as one of the tests. I'm able to refactor 4 or 5 so far but it required two types of fold. I'm calling them foldl and foldr for now (no relation to lists:foldl and lists:foldr). So far the results are mixed in that I haven't reduced the amount of code. I'm sticking to just reworking the functions in couch_key_tree internally and not changing how they interact with the rest of the code. It could turn out that some rework of how couch_key_tree is might result in a simpler couch_key_tree. [1] https://github.com/bdionne/couchdb/commits/462 > track conflict count in db_info (was built-in conflicts view) > ------------------------------------------------------------- > > Key: COUCHDB-462 > URL: https://issues.apache.org/jira/browse/COUCHDB-462 > Project: CouchDB > Issue Type: Improvement > Components: HTTP Interface > Reporter: Adam Kocoloski > Fix For: 1.2 > > Attachments: 462-jan-2.patch, COUCHDB-462-adam-updated.patch, COUCHDB-462-jan.patch, conflicts_in_db_info.diff, conflicts_in_db_info2.diff, conflicts_view.diff, whitespace.diff > > > This patch adds a built-in _conflicts view indexed by document ID that looks like > GET /dbname/_conflicts > {"rows":[ > {"id":"foo", "rev":"1-1aa8851c9bb2777e11ba56e0bf768649", "conflicts":["1-bdc15320c0850d4ee90ff43d1d298d5d"]} > ]} > GET /dbname/_conflicts?deleted=true > {"rows":[ > {"id":"bar", "rev":"5-dd31186f5aa11ebd47eb664fb342f1b1", "conflicts":["5-a0efbb1990c961a078dc5308d03b7044"], "deleted_conflicts":["3-bdc15320c0850d4ee90ff43d1d298d5d","2-cce334eeeb02d04870e37dac6d33198a"]}, > {"id":"baz", "rev":"2-eec205a9d413992850a6e32678485900", "deleted":true, "deleted_conflicts":["2-10009b36e28478b213e04e71c1e08beb"]} > ]} > As the HTTPd and view layers are a bit outside my specialty I figured I should ask for a Review before Commit. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira