roundcrisis
roundcrisis

Reputation: 17795

AllowStale on SetOperations. What it means for an index to be stale

I was wondering what it means to set allowStale = true on set operations on Raven my understanding would be that if the index is stale, the set operation will still happen. But what would it mean that the index is stale in an example?

Would it mean that a) the document was modified and the index hasn't being updated yet b) the index was updated a long time ago. c) smarter option I havent thought of?

Related question that will show the fact that I dont have much experience with Raven :)

What I would also like to know is, if it's bad practise to allowStale, what are some good strategies to ensure non staleness?

Thanks

Upvotes: 1

Views: 234

Answers (1)

Ayende Rahien
Ayende Rahien

Reputation: 22956

Miau, RavenDB updates indexes in an async fashion. That means that an index might have been updated, but the index haven't caught up with it yet. That what it means to be stale.

To allow stale set based operations means that you might miss something that was a match (or hit something that is not a match) based on your conditions. Whatever or not this is acceptable depends on your scenario.

Upvotes: 1

Related Questions