Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
2.5.1
-
Security Level: Public
-
Triaged
-
Unknown
Description
A customer reported that they had a view which was missing documents.
The view was incredibly simple and it didn't have any errors reported in the logs so it didn't make sense. There were errors for other views so I suspected that having a failed view (emit too much data, key too large, etc) in a design document may cause the other views in the same design document to not get processed for a specific document
I've setup a basic test that confirms what I suspect, the view engine will not attempt to index further views in a Design Document if a view has failed.
I created a design document with 2 views,
View A (longkey) emits a key which is too long (one of the errors you are seeing)
function (doc, meta) {
function addnumbers(str) {
for (k = 0; k < 10000; k += 1)
return str
}
foo = addnumbers(meta.id);
emit(foo, null);
}
View B (list_docs) lists all documents by id
function (doc, meta)
{ emit(meta.id, null); }When I run this design document, the view engine is failing to index the document in the first view and doesn't attempt to index the 2nd view. View B (list_docs) gives an empty result. When I remove the erroring View A (longkey) the index is regenerated and View B gives the desired result.
Can we either log the fact that View B (list_docs) has been skipped or attempt to run View B (list_docs) even though View A (longkey) failed ?
Attachments
Issue Links
- duplicates
-
MB-12863 view processing isn't incremental enough in the face of failures making it hard to work with
- Closed