You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Chris Stockton <ch...@gmail.com> on 2010/05/11 19:38:28 UTC
View cleanup failure - badmatch
Hello,
I am trying to perform view cleanup on our database. I am having
trouble diagnosing the problem due to the mystery of the error
message. Here is what the logs say:
[Tue, 11 May 2010 17:34:17 GMT] [info] [<0.19274.16>] <IP> - - 'POST'
/db_1/_view_cleanup 500
[Tue, 11 May 2010 17:34:17 GMT] [debug] [<0.19274.16>] httpd 500 error response:
{"error":"badmatch","reason":""}
Re: View cleanup failure - badmatch
Posted by Paul Davis <pa...@gmail.com>.
You should fill out an issue on JIRA so we go back to that. I reckon
the best thing would probably be to just ignore when a design doc has
parameters we use that are the wrong type but who ever writes that
patch can decide what's easiest.
On Wed, Jan 19, 2011 at 5:01 PM, Chris Stockton
<ch...@gmail.com> wrote:
> I found the issue, sent send a bit to fast on that. After making the
> "views" property a object, everything works fine. So, I think at this
> point I know how to rectify the issue on my end, although not a small
> undertaking converting all the existing customer design docs. If you
> guys know a work around to changing the views property I am interested
> (parameter etc). My only remaining thought is maybe we could get a
> better error message :D
>
> Thanks again for all the prompt help,
>
> -Chris
>
> On Wed, Jan 19, 2011 at 2:57 PM, Chris Stockton
> <ch...@gmail.com> wrote:
>> Hello,
>>
>> On Wed, Jan 19, 2011 at 2:51 PM, Paul Davis <pa...@gmail.com> wrote:
>>> Do you happen to have a field on one of your design docs named
>>> "options" in either the root scope or at a view scope that is an
>>> array? Or even perhaps a "views" member in the root namespace that is
>>> an array?
>>>
>>
>> Thanks to the response from you and Robert I did some additional
>> troubleshooting and narrowed it down to a single document:
>>
>> {
>> "_id": "_design/model_M4d377a6d5ac7c",
>> "_rev": "1-f547b13b01c102516804ca24226e6f81",
>> "describe": [
>> ],
>> "language": "javascript",
>> "name": "TestTable",
>> "staleMode": false,
>> "state": [
>> ],
>> "views": [
>> ],
>> "columnIndex": 0,
>> "created": 1295481453.3825
>> }
>>
>> I will start removing properties till I see the culprit.
>>
>> Thanks for the quick responses guys!
>>
>> -Chris
>>
>
Re: View cleanup failure - badmatch
Posted by Chris Stockton <ch...@gmail.com>.
I found the issue, sent send a bit to fast on that. After making the
"views" property a object, everything works fine. So, I think at this
point I know how to rectify the issue on my end, although not a small
undertaking converting all the existing customer design docs. If you
guys know a work around to changing the views property I am interested
(parameter etc). My only remaining thought is maybe we could get a
better error message :D
Thanks again for all the prompt help,
-Chris
On Wed, Jan 19, 2011 at 2:57 PM, Chris Stockton
<ch...@gmail.com> wrote:
> Hello,
>
> On Wed, Jan 19, 2011 at 2:51 PM, Paul Davis <pa...@gmail.com> wrote:
>> Do you happen to have a field on one of your design docs named
>> "options" in either the root scope or at a view scope that is an
>> array? Or even perhaps a "views" member in the root namespace that is
>> an array?
>>
>
> Thanks to the response from you and Robert I did some additional
> troubleshooting and narrowed it down to a single document:
>
> {
> "_id": "_design/model_M4d377a6d5ac7c",
> "_rev": "1-f547b13b01c102516804ca24226e6f81",
> "describe": [
> ],
> "language": "javascript",
> "name": "TestTable",
> "staleMode": false,
> "state": [
> ],
> "views": [
> ],
> "columnIndex": 0,
> "created": 1295481453.3825
> }
>
> I will start removing properties till I see the culprit.
>
> Thanks for the quick responses guys!
>
> -Chris
>
Re: View cleanup failure - badmatch
Posted by Chris Stockton <ch...@gmail.com>.
Hello,
On Wed, Jan 19, 2011 at 2:51 PM, Paul Davis <pa...@gmail.com> wrote:
> Do you happen to have a field on one of your design docs named
> "options" in either the root scope or at a view scope that is an
> array? Or even perhaps a "views" member in the root namespace that is
> an array?
>
Thanks to the response from you and Robert I did some additional
troubleshooting and narrowed it down to a single document:
{
"_id": "_design/model_M4d377a6d5ac7c",
"_rev": "1-f547b13b01c102516804ca24226e6f81",
"describe": [
],
"language": "javascript",
"name": "TestTable",
"staleMode": false,
"state": [
],
"views": [
],
"columnIndex": 0,
"created": 1295481453.3825
}
I will start removing properties till I see the culprit.
Thanks for the quick responses guys!
-Chris
Re: View cleanup failure - badmatch
Posted by Paul Davis <pa...@gmail.com>.
Do you happen to have a field on one of your design docs named
"options" in either the root scope or at a view scope that is an
array? Or even perhaps a "views" member in the root namespace that is
an array?
On Wed, Jan 19, 2011 at 4:21 PM, Chris Stockton
<ch...@gmail.com> wrote:
> Hello,
>
> Thank you for your response Robert,
>
> On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
>> Hi Chris,
>>
>> POST /db/_view_cleanup does work (verified locally).
>
> Good to know it does work for you, thanks for checking.
>
>> What version of couchdb are you running? You might need to add
>> -Hcontent-type:application/json, though when I tried without it I got
>> a different (and better) error message than you did.
>>
>
> I am running CouchDB 0.11.1. I am sending the correct content type.
> Here is some more detailed logging information (with a stack trace not
> previously included). In addition I should note I use view_index_dir
> and database_dir like so:
>
> --Ini Excerpt
> [couchdb]
> database_dir = /path/to/dbs
> view_index_dir = /path/to/views
>
> --Log Details
> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
> /db_1/_view_cleanup {1,1}
> Headers: [{'Accept',"*/*"},
> {'Authorization',"Basic ****"},
> {'Content-Type',"application/json"},
> {'Host',"localhost:59841"},
> {'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
> libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
> in HTTP request: {error,{badmatch,[]}}
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
> [{couch_view_group,design_doc_to_view_group,1},
> {couch_view_group,open_db_group,2},
> {couch_view,get_group_server,2},
> {couch_view,get_group_info,2},
> {couch_view,'-cleanup_index_files/1-fun-0-',2},
> {lists,map,2},
> {lists,map,2},
> {couch_view,cleanup_index_files,1}]
>
>
>> Can you hop on #couchdb?
>>
>
> Unfortunately from work I do not have access to IRC
>
Re: View cleanup failure - badmatch
Posted by Robert Newson <ro...@gmail.com>.
Chris,
the function in question is here;
https://github.com/apache/couchdb/blob/ac4dc023e5ec7f9e5bf6864f4d516ee679ca931b/src/couchdb/couch_view_group.erl#L504
we're wondering if you have something a little unusual in any of
"language", "options" or "views" keys in any of your design documents?
B.
On Wed, Jan 19, 2011 at 9:43 PM, Robert Newson <ro...@gmail.com> wrote:
> Hm, I can't see anything since 0.11.1 that looks like a fix for any
> issue like this. Wish I could reproduce it. Just in case it's
> possible, I don't suppose you can share your data?
>
> Do you have valid_user=true btw?
>
> B.
>
> On Wed, Jan 19, 2011 at 9:32 PM, Robert Newson <ro...@gmail.com> wrote:
>> Annoyingly, _view_cleanup works for me on a 0.11.1 build too.
>>
>> Looking a little deeper.
>>
>> B.
>>
>> On Wed, Jan 19, 2011 at 9:25 PM, Robert Newson <ro...@gmail.com> wrote:
>>> I'll check against 0.11.1 right now.
>>>
>>> You can get to IRC via the web at http://webchat.freenode.net/ but I
>>> understand if it's against policy.
>>>
>>> B.
>>>
>>> On Wed, Jan 19, 2011 at 9:21 PM, Chris Stockton
>>> <ch...@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> Thank you for your response Robert,
>>>>
>>>> On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
>>>>> Hi Chris,
>>>>>
>>>>> POST /db/_view_cleanup does work (verified locally).
>>>>
>>>> Good to know it does work for you, thanks for checking.
>>>>
>>>>> What version of couchdb are you running? You might need to add
>>>>> -Hcontent-type:application/json, though when I tried without it I got
>>>>> a different (and better) error message than you did.
>>>>>
>>>>
>>>> I am running CouchDB 0.11.1. I am sending the correct content type.
>>>> Here is some more detailed logging information (with a stack trace not
>>>> previously included). In addition I should note I use view_index_dir
>>>> and database_dir like so:
>>>>
>>>> --Ini Excerpt
>>>> [couchdb]
>>>> database_dir = /path/to/dbs
>>>> view_index_dir = /path/to/views
>>>>
>>>> --Log Details
>>>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
>>>> /db_1/_view_cleanup {1,1}
>>>> Headers: [{'Accept',"*/*"},
>>>> {'Authorization',"Basic ****"},
>>>> {'Content-Type',"application/json"},
>>>> {'Host',"localhost:59841"},
>>>> {'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
>>>> libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
>>>>
>>>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
>>>>
>>>> [Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
>>>> in HTTP request: {error,{badmatch,[]}}
>>>>
>>>> [Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
>>>> [{couch_view_group,design_doc_to_view_group,1},
>>>> {couch_view_group,open_db_group,2},
>>>> {couch_view,get_group_server,2},
>>>> {couch_view,get_group_info,2},
>>>> {couch_view,'-cleanup_index_files/1-fun-0-',2},
>>>> {lists,map,2},
>>>> {lists,map,2},
>>>> {couch_view,cleanup_index_files,1}]
>>>>
>>>>
>>>>> Can you hop on #couchdb?
>>>>>
>>>>
>>>> Unfortunately from work I do not have access to IRC
>>>>
>>>
>>
>
Re: View cleanup failure - badmatch
Posted by Robert Newson <ro...@gmail.com>.
Hm, I can't see anything since 0.11.1 that looks like a fix for any
issue like this. Wish I could reproduce it. Just in case it's
possible, I don't suppose you can share your data?
Do you have valid_user=true btw?
B.
On Wed, Jan 19, 2011 at 9:32 PM, Robert Newson <ro...@gmail.com> wrote:
> Annoyingly, _view_cleanup works for me on a 0.11.1 build too.
>
> Looking a little deeper.
>
> B.
>
> On Wed, Jan 19, 2011 at 9:25 PM, Robert Newson <ro...@gmail.com> wrote:
>> I'll check against 0.11.1 right now.
>>
>> You can get to IRC via the web at http://webchat.freenode.net/ but I
>> understand if it's against policy.
>>
>> B.
>>
>> On Wed, Jan 19, 2011 at 9:21 PM, Chris Stockton
>> <ch...@gmail.com> wrote:
>>> Hello,
>>>
>>> Thank you for your response Robert,
>>>
>>> On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
>>>> Hi Chris,
>>>>
>>>> POST /db/_view_cleanup does work (verified locally).
>>>
>>> Good to know it does work for you, thanks for checking.
>>>
>>>> What version of couchdb are you running? You might need to add
>>>> -Hcontent-type:application/json, though when I tried without it I got
>>>> a different (and better) error message than you did.
>>>>
>>>
>>> I am running CouchDB 0.11.1. I am sending the correct content type.
>>> Here is some more detailed logging information (with a stack trace not
>>> previously included). In addition I should note I use view_index_dir
>>> and database_dir like so:
>>>
>>> --Ini Excerpt
>>> [couchdb]
>>> database_dir = /path/to/dbs
>>> view_index_dir = /path/to/views
>>>
>>> --Log Details
>>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
>>> /db_1/_view_cleanup {1,1}
>>> Headers: [{'Accept',"*/*"},
>>> {'Authorization',"Basic ****"},
>>> {'Content-Type',"application/json"},
>>> {'Host',"localhost:59841"},
>>> {'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
>>> libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
>>>
>>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
>>>
>>> [Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
>>> in HTTP request: {error,{badmatch,[]}}
>>>
>>> [Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
>>> [{couch_view_group,design_doc_to_view_group,1},
>>> {couch_view_group,open_db_group,2},
>>> {couch_view,get_group_server,2},
>>> {couch_view,get_group_info,2},
>>> {couch_view,'-cleanup_index_files/1-fun-0-',2},
>>> {lists,map,2},
>>> {lists,map,2},
>>> {couch_view,cleanup_index_files,1}]
>>>
>>>
>>>> Can you hop on #couchdb?
>>>>
>>>
>>> Unfortunately from work I do not have access to IRC
>>>
>>
>
Re: View cleanup failure - badmatch
Posted by Robert Newson <ro...@gmail.com>.
Annoyingly, _view_cleanup works for me on a 0.11.1 build too.
Looking a little deeper.
B.
On Wed, Jan 19, 2011 at 9:25 PM, Robert Newson <ro...@gmail.com> wrote:
> I'll check against 0.11.1 right now.
>
> You can get to IRC via the web at http://webchat.freenode.net/ but I
> understand if it's against policy.
>
> B.
>
> On Wed, Jan 19, 2011 at 9:21 PM, Chris Stockton
> <ch...@gmail.com> wrote:
>> Hello,
>>
>> Thank you for your response Robert,
>>
>> On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
>>> Hi Chris,
>>>
>>> POST /db/_view_cleanup does work (verified locally).
>>
>> Good to know it does work for you, thanks for checking.
>>
>>> What version of couchdb are you running? You might need to add
>>> -Hcontent-type:application/json, though when I tried without it I got
>>> a different (and better) error message than you did.
>>>
>>
>> I am running CouchDB 0.11.1. I am sending the correct content type.
>> Here is some more detailed logging information (with a stack trace not
>> previously included). In addition I should note I use view_index_dir
>> and database_dir like so:
>>
>> --Ini Excerpt
>> [couchdb]
>> database_dir = /path/to/dbs
>> view_index_dir = /path/to/views
>>
>> --Log Details
>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
>> /db_1/_view_cleanup {1,1}
>> Headers: [{'Accept',"*/*"},
>> {'Authorization',"Basic ****"},
>> {'Content-Type',"application/json"},
>> {'Host',"localhost:59841"},
>> {'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
>> libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
>>
>> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
>>
>> [Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
>> in HTTP request: {error,{badmatch,[]}}
>>
>> [Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
>> [{couch_view_group,design_doc_to_view_group,1},
>> {couch_view_group,open_db_group,2},
>> {couch_view,get_group_server,2},
>> {couch_view,get_group_info,2},
>> {couch_view,'-cleanup_index_files/1-fun-0-',2},
>> {lists,map,2},
>> {lists,map,2},
>> {couch_view,cleanup_index_files,1}]
>>
>>
>>> Can you hop on #couchdb?
>>>
>>
>> Unfortunately from work I do not have access to IRC
>>
>
Re: View cleanup failure - badmatch
Posted by Robert Newson <ro...@gmail.com>.
I'll check against 0.11.1 right now.
You can get to IRC via the web at http://webchat.freenode.net/ but I
understand if it's against policy.
B.
On Wed, Jan 19, 2011 at 9:21 PM, Chris Stockton
<ch...@gmail.com> wrote:
> Hello,
>
> Thank you for your response Robert,
>
> On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
>> Hi Chris,
>>
>> POST /db/_view_cleanup does work (verified locally).
>
> Good to know it does work for you, thanks for checking.
>
>> What version of couchdb are you running? You might need to add
>> -Hcontent-type:application/json, though when I tried without it I got
>> a different (and better) error message than you did.
>>
>
> I am running CouchDB 0.11.1. I am sending the correct content type.
> Here is some more detailed logging information (with a stack trace not
> previously included). In addition I should note I use view_index_dir
> and database_dir like so:
>
> --Ini Excerpt
> [couchdb]
> database_dir = /path/to/dbs
> view_index_dir = /path/to/views
>
> --Log Details
> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
> /db_1/_view_cleanup {1,1}
> Headers: [{'Accept',"*/*"},
> {'Authorization',"Basic ****"},
> {'Content-Type',"application/json"},
> {'Host',"localhost:59841"},
> {'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
> libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
> in HTTP request: {error,{badmatch,[]}}
>
> [Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
> [{couch_view_group,design_doc_to_view_group,1},
> {couch_view_group,open_db_group,2},
> {couch_view,get_group_server,2},
> {couch_view,get_group_info,2},
> {couch_view,'-cleanup_index_files/1-fun-0-',2},
> {lists,map,2},
> {lists,map,2},
> {couch_view,cleanup_index_files,1}]
>
>
>> Can you hop on #couchdb?
>>
>
> Unfortunately from work I do not have access to IRC
>
Re: View cleanup failure - badmatch
Posted by Chris Stockton <ch...@gmail.com>.
Hello,
Thank you for your response Robert,
On Wed, Jan 19, 2011 at 2:01 PM, Robert Newson <ro...@gmail.com> wrote:
> Hi Chris,
>
> POST /db/_view_cleanup does work (verified locally).
Good to know it does work for you, thanks for checking.
> What version of couchdb are you running? You might need to add
> -Hcontent-type:application/json, though when I tried without it I got
> a different (and better) error message than you did.
>
I am running CouchDB 0.11.1. I am sending the correct content type.
Here is some more detailed logging information (with a stack trace not
previously included). In addition I should note I use view_index_dir
and database_dir like so:
--Ini Excerpt
[couchdb]
database_dir = /path/to/dbs
view_index_dir = /path/to/views
--Log Details
[Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] 'POST'
/db_1/_view_cleanup {1,1}
Headers: [{'Accept',"*/*"},
{'Authorization',"Basic ****"},
{'Content-Type',"application/json"},
{'Host',"localhost:59841"},
{'User-Agent',"curl/7.18.0 (x86_64-redhat-linux-gnu)
libcurl/7.18.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"}]
[Sun, 16 Jan 2011 02:36:47 GMT] [debug] [<0.20651.0>] OAuth Params: []
[Sun, 16 Jan 2011 02:36:47 GMT] [error] [<0.20651.0>] Uncaught error
in HTTP request: {error,{badmatch,[]}}
[Sun, 16 Jan 2011 02:36:47 GMT] [info] [<0.20651.0>] Stacktrace:
[{couch_view_group,design_doc_to_view_group,1},
{couch_view_group,open_db_group,2},
{couch_view,get_group_server,2},
{couch_view,get_group_info,2},
{couch_view,'-cleanup_index_files/1-fun-0-',2},
{lists,map,2},
{lists,map,2},
{couch_view,cleanup_index_files,1}]
> Can you hop on #couchdb?
>
Unfortunately from work I do not have access to IRC
Re: View cleanup failure - badmatch
Posted by Robert Newson <ro...@gmail.com>.
Hi Chris,
POST /db/_view_cleanup does work (verified locally).
What version of couchdb are you running? You might need to add
-Hcontent-type:application/json, though when I tried without it I got
a different (and better) error message than you did.
Can you hop on #couchdb?
B.
On Wed, Jan 19, 2011 at 8:55 PM, Chris Stockton
<ch...@gmail.com> wrote:
> I still have this problem, I was curious if anyone had any debugging
> ideas or tips? I have yet to ever get any database to perform view
> compaction on any install. Does this feature work?
>
> On Tue, May 11, 2010 at 10:38 AM, Chris Stockton
> <ch...@gmail.com> wrote:
>> Hello,
>>
>> I am trying to perform view cleanup on our database. I am having
>> trouble diagnosing the problem due to the mystery of the error
>> message. Here is what the logs say:
>>
>> [Tue, 11 May 2010 17:34:17 GMT] [info] [<0.19274.16>] <IP> - - 'POST'
>> /db_1/_view_cleanup 500
>> [Tue, 11 May 2010 17:34:17 GMT] [debug] [<0.19274.16>] httpd 500 error response:
>> {"error":"badmatch","reason":""}
>>
>
Re: View cleanup failure - badmatch
Posted by Chris Stockton <ch...@gmail.com>.
I still have this problem, I was curious if anyone had any debugging
ideas or tips? I have yet to ever get any database to perform view
compaction on any install. Does this feature work?
On Tue, May 11, 2010 at 10:38 AM, Chris Stockton
<ch...@gmail.com> wrote:
> Hello,
>
> I am trying to perform view cleanup on our database. I am having
> trouble diagnosing the problem due to the mystery of the error
> message. Here is what the logs say:
>
> [Tue, 11 May 2010 17:34:17 GMT] [info] [<0.19274.16>] <IP> - - 'POST'
> /db_1/_view_cleanup 500
> [Tue, 11 May 2010 17:34:17 GMT] [debug] [<0.19274.16>] httpd 500 error response:
> {"error":"badmatch","reason":""}
>