I worked around this by clearing the local cache before each use on the thread. If building the local cache is expensive, I don't like the workaround since the majority of times, I do not want the local cache enabled.
orientGraph.getRawGraph().getLocalCache().invalidate(); On Friday, October 17, 2014 11:27:13 AM UTC-4, odbuser wrote: > > I spoke too soon. I am getting the OConcurrentModificationException. I > have one thread that does some work and updates a record followed by > another thread that gets the record and updates it. The second thread > fails with OConcurrentModificationException b/c it's getting the record > from the cache and it doesn't match the one in the database. > > How would I deal with this situation? > > > On Thursday, October 16, 2014 8:22:16 PM UTC-4, odbuser wrote: >> >> By CME I assume you mean ConcurrentModificationException. I am not sure >> what you mean by single thread mode. I am using orientdb with multiple >> threads. I don't remember the impact of having the cache on but so far >> have not encountered any issues. I was just wondering why the option was >> removed as it wasn't explained in the issue. >> >> On Thursday, October 16, 2014 10:19:25 AM UTC-4, Andrey Lomakin wrote: >>> >>> Hi, >>> No you always should use local cache but level2 cache was removed, if >>> you do not use local cache you will get CME on single thread mode. >>> But you probably have objections. >>> Could you list them ? >>> >>> >>> >>> >>> On Thu, Oct 16, 2014 at 5:03 PM, odbuser <[email protected]> wrote: >>> >>>> OGlobalConfiguration.CACHE_LOCAL_ENABLED (cache.local.enabled) was >>>> removed in 2.0-SNAPSHOT since 2.0-M2. Is there a replacement? >>>> >>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "OrientDB" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Best regards, >>> Andrey Lomakin. >>> >>> Orient Technologies >>> the Company behind OrientDB >>> >>> -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
