You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Anand Chitipothu <an...@gmail.com> on 2009/03/23 06:17:19 UTC
view indexer in running again and again
Whenever I restart the couchdb server and query a view, it starts
running view indexer on all documents.
It is happening every time even though the view has already been
computed earlier.
Any idea why this is happening?
Thanks,
Anand
Re: JSONP
Posted by Brad Anderson <br...@sankatygroup.com>.
On Mar 24, 2009, at 3:20 AM, Chris Anderson wrote:
> On Mon, Mar 23, 2009 at 9:44 PM, Shawn Simister
> <na...@gmail.com> wrote:
>> I read somewhere in the archives that JSONP was being considered
>> for CouchDB
>> but I don't see it anywhere on the road map. Is it planned for an
>> upcoming
>> release or just a nice-to-have at this point? It would certainly
>> make things
>> easier on the client-side.
>>
>
> We haven't talked about it in a while. It would certainly be easy to
> implement as a middleware, but I'm all in favor of giving CouchDB the
> ability to provide it. There may be some security questions around
> having it switched on by default, but overall JSONP is a very powerful
> tool.
I've coded up a patch for JSONP.
http://issues.apache.org/jira/browse/COUCHDB-343
Cheers,
BA
Re: JSONP
Posted by Dean Landolt <de...@deanlandolt.com>.
On Tue, Mar 24, 2009 at 5:54 PM, Kurt Mackey <ku...@arstechnica.com> wrote:
> How would it work for anything but GETs?
It's not for anything but GETs -- or reads, rather. The only read I can
think of that isn't a GET is a POST for multikey retrieval, and with that
POST you could pass a callback wrapper param all the same.
RE: JSONP
Posted by Kurt Mackey <ku...@arstechnica.com>.
How would it work for anything but GETs?
-----Original Message-----
From: Flinn Mueller [mailto:theflinnster@gmail.com]
Sent: Tuesday, March 24, 2009 8:37 AM
To: user@couchdb.apache.org
Subject: Re: JSONP
+1 for JSON-P
On Mar 24, 2009, at 3:20 AM, Chris Anderson wrote:
> On Mon, Mar 23, 2009 at 9:44 PM, Shawn Simister
> <na...@gmail.com> wrote:
>> I read somewhere in the archives that JSONP was being considered
>> for CouchDB
>> but I don't see it anywhere on the road map. Is it planned for an
>> upcoming
>> release or just a nice-to-have at this point? It would certainly
>> make things
>> easier on the client-side.
>>
>
> We haven't talked about it in a while. It would certainly be easy to
> implement as a middleware, but I'm all in favor of giving CouchDB the
> ability to provide it. There may be some security questions around
> having it switched on by default, but overall JSONP is a very powerful
> tool.
>
> Chris
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
Re: JSONP
Posted by Flinn Mueller <th...@gmail.com>.
+1 for JSON-P
On Mar 24, 2009, at 3:20 AM, Chris Anderson wrote:
> On Mon, Mar 23, 2009 at 9:44 PM, Shawn Simister
> <na...@gmail.com> wrote:
>> I read somewhere in the archives that JSONP was being considered
>> for CouchDB
>> but I don't see it anywhere on the road map. Is it planned for an
>> upcoming
>> release or just a nice-to-have at this point? It would certainly
>> make things
>> easier on the client-side.
>>
>
> We haven't talked about it in a while. It would certainly be easy to
> implement as a middleware, but I'm all in favor of giving CouchDB the
> ability to provide it. There may be some security questions around
> having it switched on by default, but overall JSONP is a very powerful
> tool.
>
> Chris
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
Re: JSONP
Posted by Chris Anderson <jc...@apache.org>.
On Mon, Mar 23, 2009 at 9:44 PM, Shawn Simister <na...@gmail.com> wrote:
> I read somewhere in the archives that JSONP was being considered for CouchDB
> but I don't see it anywhere on the road map. Is it planned for an upcoming
> release or just a nice-to-have at this point? It would certainly make things
> easier on the client-side.
>
We haven't talked about it in a while. It would certainly be easy to
implement as a middleware, but I'm all in favor of giving CouchDB the
ability to provide it. There may be some security questions around
having it switched on by default, but overall JSONP is a very powerful
tool.
Chris
--
Chris Anderson
http://jchrisa.net
http://couch.io
JSONP
Posted by Shawn Simister <na...@gmail.com>.
I read somewhere in the archives that JSONP was being considered for
CouchDB but I don't see it anywhere on the road map. Is it planned for
an upcoming release or just a nice-to-have at this point? It would
certainly make things easier on the client-side.
Shawn
<http://wiki.apache.org/couchdb/Getting_started_with_ExtJS>
Re: view indexer in running again and again
Posted by Peter Hsu <ph...@abaca.com>.
I've run into this before when I've run out of disk space. After
freeing up disk space, Couch seems to be in a bad state. After
restarting, it recomputes all views. I haven't tried to reproduce,
but maybe this helps.
Peter
On Mar 23, 2009, at 3:14 AM, Jan Lehnardt wrote:
> Hi Anand,
>
> thanks for your report! Are you on the latest CouchDB trunk and
> latest Erlang (R12B-4 or -5)? Can you provide a script we can run
> that demonstrates the behaviour?
>
>
> Cheers
> Jan
> --
>
>
>
> On 23 Mar 2009, at 06:17, Anand Chitipothu wrote:
>
>> Whenever I restart the couchdb server and query a view, it starts
>> running view indexer on all documents.
>> It is happening every time even though the view has already been
>> computed earlier.
>> Any idea why this is happening?
>>
>> Thanks,
>> Anand
>>
Re: view indexer in running again and again
Posted by Anand Chitipothu <an...@gmail.com>.
>> There is a code to compute the view
>
> view functions or map/reduce functions or view definition
>
>> , there is a view file stored on disk
>
> view index [file]
>
>> , there is a process to compute the view
>
> view updater
>
>> and there is url to query to the view.
>
> view URL
Thanks.
Re: view indexer in running again and again
Posted by Jan Lehnardt <ja...@apache.org>.
On 24 Mar 2009, at 05:59, Anand Chitipothu wrote:
>> thanks for your report! Are you on the latest CouchDB trunk and
>> latest Erlang (R12B-4 or -5)? Can you provide a script we can run
>> that demonstrates the behaviour?
>
> I figured out what caused this problem.
>
> There was some problem with my view code and it was raising
> exceptions. I wasn't looking at the output of view queries as I was
> only interested in benchmarking the performance. Here is my
> observation:
>
> When the view code has error, the view indexer is run on first access
> to the view after starting couchdb.
>
> To re-produce:
>
> * create a db with some documents.
> * add view with the following map function (it produces exceptions in
> view computation):
>
> "map": "function(doc) { x; }"
>
> * query the view: view indexer is executed
> * query the view again: view indexer is not executed
> * restart couchdb
> * query the view again: view indexer is executed
>
> I'm slightly confused with the terminology.
> There is a code to compute the view
view functions or map/reduce functions or view definition
> , there is a view file stored on disk
view index [file]
> , there is a process to compute the view
view updater
> and there is url to query to the view.
view URL
Cheers
Jan
--
Re: view indexer in running again and again
Posted by Anand Chitipothu <an...@gmail.com>.
> thanks for your report! Are you on the latest CouchDB trunk and
> latest Erlang (R12B-4 or -5)? Can you provide a script we can run
> that demonstrates the behaviour?
I figured out what caused this problem.
There was some problem with my view code and it was raising
exceptions. I wasn't looking at the output of view queries as I was
only interested in benchmarking the performance. Here is my
observation:
When the view code has error, the view indexer is run on first access
to the view after starting couchdb.
To re-produce:
* create a db with some documents.
* add view with the following map function (it produces exceptions in
view computation):
"map": "function(doc) { x; }"
* query the view: view indexer is executed
* query the view again: view indexer is not executed
* restart couchdb
* query the view again: view indexer is executed
I'm slightly confused with the terminology. There is a code to compute
the view, there is a view file stored on disk, there is a process to
compute the view and there is url to query to the view. How should I
call each one of this?
Anand
Re: view indexer in running again and again
Posted by Jan Lehnardt <ja...@apache.org>.
Hi Anand,
thanks for your report! Are you on the latest CouchDB trunk and
latest Erlang (R12B-4 or -5)? Can you provide a script we can run
that demonstrates the behaviour?
Cheers
Jan
--
On 23 Mar 2009, at 06:17, Anand Chitipothu wrote:
> Whenever I restart the couchdb server and query a view, it starts
> running view indexer on all documents.
> It is happening every time even though the view has already been
> computed earlier.
> Any idea why this is happening?
>
> Thanks,
> Anand
>