couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronan Jouchet <ronan.jouc...@cadensimaging.com>
Subject Re: Clarifications on CouchDB "index disabling" behavior on view errors/exceptions
Date Thu, 14 Jan 2016 15:01:48 GMT
Hi Robert.

Good to know! I created oreilly/couchdb-guide#pr549, "tour.html: remove 
false claim that engine "shuts off indexing" on view errors":
https://github.com/oreilly/couchdb-guide/pull/549

Additional comments/knowledge welcome there. Also, moving this thread to 
couchdb-dev, as it'd benefit from developer confirmation/refutation.

Thanks.

Ronan

On 01/13/2016 06:05 PM, Robert Samuel Newson wrote:
> 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