You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Miki Tebeka (JIRA)" <ji...@apache.org> on 2009/10/15 20:54:31 UTC

[jira] Created: (COUCHDB-530) reduce_overflow_error on a view without reduce

reduce_overflow_error on a view without reduce
----------------------------------------------

                 Key: COUCHDB-530
                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 0.10
         Environment: Ubuntu 9.04
            Reporter: Miki Tebeka


This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
When running the view I get the following error:
    (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
    {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}

What's interesting is that this view does not have a reduce function. The map function is:
    function (doc) {
        if (doc.Type == 'max active') {
            emit(doc.Time, doc.Count);
        }
    }

A typical document looks like:
    {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766216#action_12766216 ] 

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

Can anyone download that attachment? JIRA is being weird about it.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Miki Tebeka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766208#action_12766208 ] 

Miki Tebeka commented on COUCHDB-530:
-------------------------------------

Yes, there are other views in the same design who do use reduce. I'm attaching the design.
Come to think of it, the problem started when trying to access another view in this design, can't remember exactly which.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766267#action_12766267 ] 

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

I don't think it was an error in 0.9.1 and its possible to disable that check in the config.

One thing that we have said before is the ability to make views return errors and warnings to the user from view building but the current setup makes that somewhat difficult currently.

Also, that error is a bit wonky with the list vs binary confusion. I'll put it on the list to fix.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766229#action_12766229 ] 

Adam Kocoloski commented on COUCHDB-530:
----------------------------------------

worked for me in Safari

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Miki Tebeka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766273#action_12766273 ] 

Miki Tebeka commented on COUCHDB-530:
-------------------------------------

Thanks Paul. I'll update my view or change the config. Should I close this bug then?

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Miki Tebeka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766265#action_12766265 ] 

Miki Tebeka commented on COUCHDB-530:
-------------------------------------

Just saw your comment.

1. I think the error can be more helpful.
2. I still don't understand how it works with 0.9.1 on the same data.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766279#action_12766279 ] 

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

No prob. I resolved it earlier when I saw return Array.concat ;)

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Miki Tebeka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766259#action_12766259 ] 

Miki Tebeka commented on COUCHDB-530:
-------------------------------------

Paul, I've emailed you the file.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766172#action_12766172 ] 

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

Is there another view in the same design doc that does have a reduce function? I've never seen a report of that error being triggered accidentally and your view doesn't do anything that should cause it.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis resolved COUCHDB-530.
---------------------------------------

    Resolution: Invalid
      Assignee: Paul Joseph Davis

Oh there it is.

In the "duration_by_day" view the reduce function is doing "return Array.concat.apply(Array, values);" which will most assuredly break the reduce limit. Remember that when you build a view CouchDB is building all views in the same design doc, so the errors will be reported for any of the views in that doc.


> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>            Assignee: Paul Joseph Davis
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-530) reduce_overflow_error on a view without reduce

Posted by "Miki Tebeka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Miki Tebeka updated COUCHDB-530:
--------------------------------

    Attachment: stats.view

The design who's causing the problem.

> reduce_overflow_error on a view without reduce
> ----------------------------------------------
>
>                 Key: COUCHDB-530
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-530
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.10
>         Environment: Ubuntu 9.04
>            Reporter: Miki Tebeka
>         Attachments: stats.view
>
>
> This view used to work on 0.9.1, I've installed 0.10.0 and migrated some data.
> When running the view I get the following error:
>     (env2.5)[11:47] admin $curl 'localhost:5985/stats/_design/stats/_view/active'
>     {"error":"reduce_overflow_error","reason":"Reduce output must shrink more rapidly: Current output: '[[25,17,117,25,93,17,13,13,12,24,14,13,10,15,20,12,14,14,17,36,38,83,18,11,1058,12,10,29,13,12,10,14'... (first 100 of 1395 bytes)"}
> What's interesting is that this view does not have a reduce function. The map function is:
>     function (doc) {
>         if (doc.Type == 'max active') {
>             emit(doc.Time, doc.Count);
>         }
>     }
> A typical document looks like:
>     {"_id":"02c94bea2900686a01ebbf8829aabfa2","_rev":"1-cccb3b5eb382bf609bd41feb85af063b","Count":2,"Type":"max active","Time":1254362400.0}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.