You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Paul Joseph Davis (JIRA)" <ji...@apache.org> on 2016/08/12 15:29:20 UTC

[jira] [Commented] (COUCHDB-3101) Builtin reduce functions should not throw errors

    [ https://issues.apache.org/jira/browse/COUCHDB-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418998#comment-15418998 ] 

Paul Joseph Davis commented on COUCHDB-3101:
--------------------------------------------

I should note, I prefer null because if we drop data the user doesn't realize was malformed then they'll have no signal that something is broken and may instead rely on probably invalid data out of the reducer. Also notice the null is just for any reducer that's broken it doesn't null out any other reducer or anything of that nature.

So basically if say a user has a _sum reduce function and emits a string as a value this would return null for any reduce query for that specific view. Any other view in the same ddoc would be unaffected.

> Builtin reduce functions should not throw errors
> ------------------------------------------------
>
>                 Key: COUCHDB-3101
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3101
>             Project: CouchDB
>          Issue Type: Bug
>          Components: View Server Support
>            Reporter: Paul Joseph Davis
>
> So I just figured out we have an issue with the builtin reduce functions. Currently, if they receive invalid data they'll throw an error. Unfortunately what ends up happening is that if the error is never corrected then the view files end up becoming bloated and refusing to open (because they're searching for a header as Jay pointed out the other week).
> We should either return null or ignore the bad data. My preference would be to return null so that it indicates bad data was given somewhere but I could also see just dropping the bad value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)