couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <adam.kocolo...@gmail.com>
Subject Re: stale views and scalability
Date Thu, 19 Mar 2009 11:54:02 GMT
On Mar 19, 2009, at 7:39 AM, Curtis Caravone wrote:

> The documentation for stale=ok describes the following semantics:
>
> The stale option can be used for higher performance ...  Using this
> option essentially tells CouchDB that if a reference to the view index
> is available in memory, go ahead and use it, even if it may be out of
> date. ...if there is no view index pointer in memory, the behavior
> with this option is that same as the behavior without the option...
>
> For views of large data sets with frequent updates, it is highly
> likely that a random key or range query will fail to find its data in
> memory, so the query will block until the view has been updated.  In
> fact, multiple concurrent requests will all block until the update has
> completed, which is an issue for scalability.  It seems like there
> should be an option to immediately return the view query results based
> on the latest available snapshot of the view index, regardless of
> whether it is in memory or on disk.
>
> Is this something that's easy to implement?
>
> Curtis

Hi Curtis, stale=ok works the way you want it to now.  A reference to  
the view index is still available even if the entire index is too  
large to fit in memory.  I think the language about finding a  
reference was meant to cover the case where the view had not been  
built or accessed yet.  Best,

Adam

Mime
View raw message