Hi we are currently testing an application using Map-reduce views and what we are finding is that documents are taking a long time to appear in view results (or even not appearing at all) when we use stale=true in the view query.
If I understand correctly then the longest we’d expect to wait with these settings is 5 secs. We are seeing delays of several minutes and are often having to execute a stale=false query to force the refresh. We are seeing this behaviour in multiple environments and multiple versions (2.0.1 and 2.1.0). Can someone clarify what is going on here - i.e. is this to be expected or not. If yes, is there something else we need to do to ensure that auto updating is working?
UPDATE: having spoken with CB support, it seems that both the updateInterval AND updateMinChanges conditions must be met (i.e. every 5 secs, a check will be made to see if the updateMinChanges limit has been reached). Our confusion was that we assumed that an update would occur when 1 OR the other condition was met.
So I had the same understanding than you… this is why I commented this way.
I looked closely to the documentation again and it is effectively explained clearly; see: couchbase-manual-2.2
updateInterval : the time interval in milliseconds, default is 5000 milliseconds. At every updateInterval the views engine checks if the number of document mutations on disk is greater than updateMinChanges. If true, it triggers view update. The documents stored on disk potentially lag documents that are in-memory for tens of seconds.