[ https://issues.apache.org/jira/browse/COUCHDB-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990524#comment-12990524 ]
Bob Dionne commented on COUCHDB-462: ------------------------------------ Thanks Adam, Here's a fix[1] for both issues you mention, and a few more etaps to test it. Looking over couch_key_tree I agree with you and Randall that many funs have similar shapes and it could likely use a fold. I'll look at that next. I'm not sure about using throw in Erlang. I know in Java where try/catch is enforced I've used it for precisely this case where you want out of a recursion based on some condition. Erlang has a different approach to failure. I'll look into it. What' s really needed in these cases is Scheme's call-with-current-continuation. Cheers, Bob [1] https://github.com/bdionne/couchdb/commit/593bcde1b4.patch > 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