How to load multiple documents if there is a replication conflict?

43 views
Skip to first unread message

Erik Olson

unread,
Oct 31, 2014, 5:08:16 PM10/31/14
to rav...@googlegroups.com
We are experimenting with master-master replication prior to rolling it out using build 2936 (2935 client) .When we call Load<T>(ids) where one of the ids is of a conflicted document, we get the following exception:

`Unable to cast object of type 'Raven.Abstractions.Linq.DynamicJsonObject' to type 'MyObjectType.
   at Raven.Client.Document.DocumentSession.<LoadInternal>b__a[T](String id)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Raven.Client.Document.DocumentSession.LoadInternal[T](String[] ids)
   at Raven.Client.Document.DocumentSession.Load[T](String[] ids)`
   
If we make the call without the conflicted document, it works fine.  

Our IDocumentConflictListener never gets called when we use the multiple document load. We've verified the conflict listener does get called for a single document load.

We're wondering if anyone has run across this or might have suggestions for how to deal with it.  Our code base unfortunately uses Load<T>(string[]) quite a bit to do small scatter loads in a single roundtrip.

We're planning on using a 2 node master/master cluster but only writing to a single node.  Hopefully this means conflicts will be very rare.  Are we better off just using master/slave?

Thanks for any ideas anyone might have!

Oren Eini (Ayende Rahien)

unread,
Oct 31, 2014, 8:15:18 PM10/31/14
to ravendb
I'm pretty sure that we never considered this scenario.


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.

Reply all
Reply to author
Forward
0 new messages