couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Samuel Newson <rnew...@apache.org>
Subject Re: Clarifications on CouchDB "index disabling" behavior on view errors/exceptions
Date Wed, 13 Jan 2016 23:05:26 GMT
Hi,

Interesting find. I don’t believe this was ever true, the view engine will continue to build
in the face of exceptions being thrown for every single document it encounters.

B.

> On 13 Jan 2016, at 19:43, Ronan Jouchet <ronan.jouchet@cadensimaging.com> wrote:
> 
> Hi.
> 
> The CouchDB Guide ( http://guide.couchdb.org/draft/tour.html ) mentions that:
>> when a map function fails regularly (due to a missing required field
>> or other JavaScript exception), CouchDB shuts off its indexing to
>> prevent any further resource usage
> 
> But neither the official doc, nor my Google-fu could provide details:
> 
> 1. Is this still true as of CouchDB 1.6.1 / 2.0alpha?
> 
> 2. Which JS errors/exceptions cause a view to be "disabled", exactly?
> 
> 2.a. In particular, just accessing a non-existent key of a `doc` object
>     is not considered an error, right? It evaluates to `undefined`
>     faithfully to vanilla JS behavior, correct? Said differently,
>         `if (doc.species && doc.species === 'human')`
>     is equivalent to:
>         `if (doc.species === 'human')` , right?
> 
> 3. How can I "re-enable" a "disabled" view?
> 
> Thanks :)
> 
> -- 
> Ronan


Mime
View raw message