How to detect indexes that need reset?

19 views
Skip to first unread message

Patrick

unread,
Apr 23, 2015, 9:31:18 PM4/23/15
to rav...@googlegroups.com
Here's the scenario:
  1. Updated indexes
  2. Indexes go stale for a while
  3. Indexes no longer stale
  4. Indexes are "missing" documents
    1. e.g. return 0 or a few results instead of the 1000s of documents that exist
The problem with this is that we didn't know until a customer complained that the app was misbehaving (it looked like we lost data). I would much rather detect this situation and correct it preemptively. Also, we have 130 or so tenant databases, I can't manually verify all of them.

So, is there a way to (programmatically) tell that indexes are in this "bad" state and need a reset?

Corollary question: what causes this to happen and how can we prevent it?

Oren Eini (Ayende Rahien)

unread,
Apr 24, 2015, 2:43:23 AM4/24/15
to ravendb
Patrick,
There shouldn't be such a case.
You can check the number of items in the index and compare to the number of docs, but that about it.

Such scenario is likely the result (based on your other mail) because of the errors in the update process that you mentioned, or because your I/O is saturated and erroring on index writes.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oren Eini (Ayende Rahien)

unread,
Apr 24, 2015, 2:43:42 AM4/24/15
to ravendb
Note that all such errors should be logged.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Fri, Apr 24, 2015 at 4:31 AM, Patrick <pjbo...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages