Index Errors potential cause of data loss?

26 views
Skip to first unread message

Mark

unread,
Feb 2, 2016, 4:53:22 AM2/2/16
to RavenDB - 2nd generation document database, mark...@msmsoftware.com
We have recently taken on support of a production system that uses RavenDB hosted in RavenHQ.  The customer has reported issues with data loss and looking at the Raven Management Studio there are very frequent errors relating to a reduce index, the text of the error is always similar to:

Index             UserAggregates

Error             Cannot implicitly convert type 'Raven.Abstractions.Linq.DynamicNullObject' to 'bool'

Timestamp   5 hours ago (02/02/16, 4:06am)

Index             UserAggregates

Document    StrategicPlanSnapshots/f56b8a86-5117-4897-89a3-3fe65a1135a4


The data referenced in the errors (i.e. the DocumentId) is always absent from the database once this error has occurred so I am wondering if the data-loss reported could be in some way related to the index error?

The application that makes the updates to the data uses the v3.0.3800 of Raven.Client.Lightweight.dll and calls IDocumentSession.SaveChanges() to make the updates.  The database itself is on v3.0.3660 of RavenDB.

The definition of the reduce index in question is shown in the attached screen grab.

Any advice or help on how we can resolve the index errors and if it is at all plausible that this could be related to data loss would be much appreciated.



UserAggregatesIndex.png

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2016, 4:56:30 AM2/2/16
to ravendb, mark...@msmsoftware.com
Your index is trying to cast a null to a boolean, and it errors.
Because it doesn't, it can't complete the indexing process, and the results won't end up in the index.
That is expected when the index is throwing.

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,
Feb 2, 2016, 4:56:44 AM2/2/16
to ravendb, mark...@msmsoftware.com
Note that there is no data loss, and if you'll fix the index, it will properly index everything.

Mark

unread,
Feb 2, 2016, 5:33:46 AM2/2/16
to RavenDB - 2nd generation document database, mark...@msmsoftware.com
Hi Oren,
Thanks for taking the time to reply.  I think I may not have explained myself correctly.

The index definition (as far as I can see) does not include any Boolean types - therefore I am at a loss as to where this error is bubbling up from - any additional help you can give me in tracking this down would be appreciated.

Also the potential data loss issue does not relate to the fact that the reduce index is missing data but rather that the DocumentID shown in the error message (i.e. the StrategicPlanSnapshots/f56b8a86-5117-4897-89a3-3fe65a1135a4 in the example above) is missing from the StrategicPlanSnapshots collection after this error has occurred.

If you are able to give me any pointers on how to avoid this scenario that would be much appreciated.

Oren Eini (Ayende Rahien)

unread,
Feb 2, 2016, 7:08:54 AM2/2/16
to ravendb, mark...@msmsoftware.com
Look at the where clauses, the issue is probably there.

Hibernating Rhinos Ltd  

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

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

 


--
Reply all
Reply to author
Forward
0 new messages