OGlobalConfiguration.CACHE_LOCAL_ENABLED

204 views
Skip to first unread message

odbuser

unread,
Oct 16, 2014, 10:03:04 AM10/16/14
to orient-...@googlegroups.com
OGlobalConfiguration.CACHE_LOCAL_ENABLED (cache.local.enabled) was removed in 2.0-SNAPSHOT since 2.0-M2.  Is there a replacement?

Andrey Lomakin

unread,
Oct 16, 2014, 10:19:25 AM10/16/14
to orient-database
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 <odbu...@gmail.com> 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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

odbuser

unread,
Oct 16, 2014, 8:22:16 PM10/16/14
to orient-...@googlegroups.com
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.

odbuser

unread,
Oct 17, 2014, 11:27:13 AM10/17/14
to orient-...@googlegroups.com
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?

odbuser

unread,
Oct 19, 2014, 12:07:33 AM10/19/14
to orient-...@googlegroups.com
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();

Andrey Lomakin

unread,
Oct 20, 2014, 4:41:19 AM10/20/14
to orient-database
Hi,
It is very cheap.

At once we fix https://github.com/orientechnologies/orientdb/issues/2901 and https://github.com/orientechnologies/orientdb/issues/2900 and can use document db instance as jdbc connection and this problem will gone.

odbuser

unread,
Oct 20, 2014, 3:15:30 PM10/20/14
to orient-...@googlegroups.com

At once we fix https://github.com/orientechnologies/orientdb/issues/2901 and https://github.com/orientechnologies/orientdb/issues/2900 and can use document db instance as jdbc connection and this problem will gone.

What does this mean?

Andrey Lomakin

unread,
Oct 21, 2014, 2:56:53 AM10/21/14
to orient-database
Hi,

By design instance of document database should be treated as lightweight connection to database storage which adds  data unmarshaling features, so it means that open/close should be lightweight operation.
But now it is not true, we are going to change it, which means that open/close operation will cost few ns instead of ms as it is now.
Reply all
Reply to author
Forward
0 new messages