documents not showing in view queries for a very long time even with stale=false
trying some simple map/reduce views in 2.0 dp4. but it seems to take a very long time for the document to appear in a view, on the order of minutes to tens of minutes. Thought there was a problem with the documents, then the cluster, or disk write permissions or something, but does not appear to be the case. Moved to another cluster we had set up for a different purpose and the same issue exists. It appears that a document does not show up in an index until the disk queue for its containing node is flushed, and that if a node / cluster is lightly used the time for this to happen can be many minutes.
In this case the map is really simple, no reduce fn
function (doc) {
if ( doc.type == "wall_post" ) {
emit(doc._id, null);
}
}
query executed both with stale=false and also tried multiple queries each with stale=update_after
This is something that should work, right? An idle cluster should flush to disk quickly not after some long interval right? Bug or design?
I have a diag report zipped and ready to go if any one needs it.
Hey Trevor,
What SDK are you using? If you're using the HTTP API directly, you'll need to be sure to add full_set=true otherwise you're only getting back partial view results.
If you try that and still aren't seeing results in a timely fashion (certainly faster than the times you reported above), toss the .zip file up on some file host, and drop the URL in your reply. We'll take a look.
Thanks, Trevor,
Benjamin