You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by mi...@free.fr on 2010/10/07 17:11:29 UTC

design doc weakness (one view fails = all views fail)

Hello devs,

it seems that, on a design document, if there is one view having an error ( for example "Expression does not eval to a function" ) than all other views are then unusable.
It's not critical and not a real bug, but from my (sysadmin) point of view it's a weakness : one error on one part of the design doc leads to a totally broken app / couchapp.

Steps to reproduce : 

1/ create a new database
2/ Create a design doc :


{
   "_id": "_design/doc1",
   "views": {
       "v1": {
           "map": "function() {}"
       },
       "v2": {
           "map": "thefunction() {}"
       }
   },
   "language": "javascript"
}

3/ Create a doc :

{
   "_id": "doc1"
}

4/ Call the "v1" view

What's your opinion on this ? Is it worth creating a Jira bug ?

Regards,

Mickael

Re: design doc weakness (one view fails = all views fail)

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Mickael,

given nobody responded to this yet, I'd say it's a good idea
to file a JIRA so we don't forget looking into it :)

Cheers
Jan
-- 

On 7 Oct 2010, at 17:11, mickael.bailly@free.fr wrote:

> Hello devs,
> 
> it seems that, on a design document, if there is one view having an error ( for example "Expression does not eval to a function" ) than all other views are then unusable.
> It's not critical and not a real bug, but from my (sysadmin) point of view it's a weakness : one error on one part of the design doc leads to a totally broken app / couchapp.
> 
> Steps to reproduce : 
> 
> 1/ create a new database
> 2/ Create a design doc :
> 
> 
> {
>   "_id": "_design/doc1",
>   "views": {
>       "v1": {
>           "map": "function() {}"
>       },
>       "v2": {
>           "map": "thefunction() {}"
>       }
>   },
>   "language": "javascript"
> }
> 
> 3/ Create a doc :
> 
> {
>   "_id": "doc1"
> }
> 
> 4/ Call the "v1" view
> 
> What's your opinion on this ? Is it worth creating a Jira bug ?
> 
> Regards,
> 
> Mickael


Re: design doc weakness (one view fails = all views fail)

Posted by mi...@free.fr.
I created the Jira issue.

Regards

----- Mail Original -----
De: "Paul Davis" <pa...@gmail.com>
À: dev@couchdb.apache.org
Envoyé: Jeudi 4 Novembre 2010 18h09:57 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: design doc weakness (one view fails = all views fail)

On Thu, Oct 7, 2010 at 11:11 AM,  <mi...@free.fr> wrote:
> Hello devs,
>
> it seems that, on a design document, if there is one view having an error ( for example "Expression does not eval to a function" ) than all other views are then unusable.
> It's not critical and not a real bug, but from my (sysadmin) point of view it's a weakness : one error on one part of the design doc leads to a totally broken app / couchapp.
>
> Steps to reproduce :
>
> 1/ create a new database
> 2/ Create a design doc :
>
>
> {
>   "_id": "_design/doc1",
>   "views": {
>       "v1": {
>           "map": "function() {}"
>       },
>       "v2": {
>           "map": "thefunction() {}"
>       }
>   },
>   "language": "javascript"
> }
>
> 3/ Create a doc :
>
> {
>   "_id": "doc1"
> }
>
> 4/ Call the "v1" view
>
> What's your opinion on this ? Is it worth creating a Jira bug ?
>
> Regards,
>
> Mickael
>

Its definitely worth creating a JIRA issue for so that there's a place
for discussion. This has been brought up a couple times, but no one to
my knowledge has had a good idea of how to solve the issue.

For instance, if a single view breaks, all views will need to be
rebuilt when that view is fixed anyway. The only thing that comes to
mind right now is to have better error reporting so users know what's
broken.

HTH,
Paul Davis

Re: design doc weakness (one view fails = all views fail)

Posted by Paul Davis <pa...@gmail.com>.
On Thu, Oct 7, 2010 at 11:11 AM,  <mi...@free.fr> wrote:
> Hello devs,
>
> it seems that, on a design document, if there is one view having an error ( for example "Expression does not eval to a function" ) than all other views are then unusable.
> It's not critical and not a real bug, but from my (sysadmin) point of view it's a weakness : one error on one part of the design doc leads to a totally broken app / couchapp.
>
> Steps to reproduce :
>
> 1/ create a new database
> 2/ Create a design doc :
>
>
> {
>   "_id": "_design/doc1",
>   "views": {
>       "v1": {
>           "map": "function() {}"
>       },
>       "v2": {
>           "map": "thefunction() {}"
>       }
>   },
>   "language": "javascript"
> }
>
> 3/ Create a doc :
>
> {
>   "_id": "doc1"
> }
>
> 4/ Call the "v1" view
>
> What's your opinion on this ? Is it worth creating a Jira bug ?
>
> Regards,
>
> Mickael
>

Its definitely worth creating a JIRA issue for so that there's a place
for discussion. This has been brought up a couple times, but no one to
my knowledge has had a good idea of how to solve the issue.

For instance, if a single view breaks, all views will need to be
rebuilt when that view is fixed anyway. The only thing that comes to
mind right now is to have better error reporting so users know what's
broken.

HTH,
Paul Davis