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
--

Reply via email to