couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Newson (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1444) missing_named_view error on existing javascript design doc and view
Date Thu, 09 Aug 2012 12:26:19 GMT


Robert Newson commented on COUCHDB-1444:

I have some more news. Stefan was gracious enough to open distributed erlang on his server
and grant me ssh access to the box. the error arose today and I've looked inside the erlang

What's happening is the view_group process has, somehow, got the *wrong* design document fragment
inside it. We look up the view group by signature and then ask that process to match on the
view name. 

The group_state for "_design/podcastlists"' init_args is correct (has "by_user_slug" and "by_rating"),
the group_state's group member, however, is for a completely different design document ("_design/chapters").

I proved this mismatch comprehensively;

Here's the design document, with only "by_user_slug" and "by_rating";

rnewson@foo:~$ curl ""
   if(doc.doc_type == \"PodcastList\")\n    {\n        emit([doc.user, doc.slug], null);\n
   }\n}"},"by_rating":{"map":"function(doc)\n{\n    if(doc.doc_type == \"PodcastList\")\n
   {\n        if(doc.podcasts == null || doc.podcasts.length == 0)\n        {\n          
 return;\n        }\n\n        var rating = 0;\n        for(var n in doc.ratings)\n      
 {\n            rating += doc.ratings[n].rating;\n        }\n\n        if (rating >= 0)\n
       {\n            emit(rating, null);\n        }\n    }\n}"}},"couchapp":{"signatures":{},"objects":{},"manifest":["views/","views/by_user_slug/","views/by_user_slug/map.js","views/by_rating/","views/by_rating/map.js"]}}

But "by_rating" gives a 404, missing_named_view;

rnewson@foo:~curl ""

And "by_episode" which is *not* present in "_design/podcastlists" but *is* present in "_design/chapters"
*is* found;
rnewson@foo:~$ curl ""

And here's "_design/chapters";
rnewson@foo:~$ curl ""
   if(doc.doc_type == \"EpisodeUserState\")\n    {\n        for(var n in doc.chapters)\n 
      {\n            var chapter = doc.chapters[n];\n            emit([doc.episode, doc.user],
chapter);\n        }\n    }\n}"}},"couchapp":{"signatures":{},"objects":{},"manifest":["views/","views/by_episode/","views/by_episode/map.js"]}}
> missing_named_view error on existing javascript design doc and view
> -------------------------------------------------------------------
>                 Key: COUCHDB-1444
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 1.1.1
>         Environment: Ubuntu 11.01 64 bit Erlang R13B03
>            Reporter: Sam Lown
>            Priority: Critical
>              Labels: 404, bug, missing_named_view
>         Attachments: couchdb-missing-view.log
> Moved over from issue: which has similar
symptoms but the view is written in Erlang.
> On our production server for no apparent reason, one of our views just suddenly stopped
responding to requests. The design document was still visible in Futon and the "all" view
did provide a list of documents. All other views in the ddoc responded with a 404 {"error":"not_found","reason":"missing_named_view"}.
> Restarting the couchdb server resolved the issue, and I've as yet been unable to reproduce
the problem.
> Here is the last successful log entry for the view:
>     [Fri, 16 Mar 2012 13:14:19 GMT] [info] [<0.831.531>] - - 'GET'
> Many requests later to other documents and views, here is when requests stopped working,
some 6 minutes later: 
>     [Fri, 16 Mar 2012 13:20:29 GMT] [info] [<0.4510.531>] - - 'GET'
> Here is the design document in question: 
> I could see nothing in the logs out of the ordinary.
> Obviously, this problem is very alarming indeed and not something I've come across before
in CouchDB. As you can see the view in question is related to Payments, which is something
we really do not want to go wrong. 
> Please let me know if I can provide more information.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message