-
Book Overview & Buying
-
Table Of Contents
RavenDB 2.x Beginner's Guide
By :
RavenDB indexes can be stale. They are eventually consistent and eventually here usually means in under a second. When you query RavenDB to retrieve some data, it will return the data whether or not it has finished indexing this data in the background. RavenDB will let the user know if query results are stale, and can also be told to wait until non-stale results are available, this allows introducing new indexes on the fly. Live index rebuilds is a rare feature.
Waiting for a non-stale index is not a recommended practice for production systems.
In RavenDB whenever new data is inserted or updated, a background process will perform data indexing. This might be useful to improve the server response time but in this case you may query stale indexes. In a lot of situations, a stale index isn't a problem, and as expressed on the RavenDB site:
Better stale than offline.
When you call the SaveChanges() method on the session object to persist changes on some objects, and try...
Change the font size
Change margin width
Change background colour