ConcurrentModificationException during ODatabasePoolBase.acquire
OrientDB 1.7.9
Happens very rarely, but very bad when it does happens. App is very thread heavy and uses threadlocal to make db connection thread safe, but during the acquire from the OObjectDatabasePool we get a concurrentmodificationexception.
Below is stack.
java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926) at java.util.HashMap$EntryIterator.next(HashMap.java:966) at java.util.HashMap$EntryIterator.next(HashMap.java:964) at com.orientechnologies.orient.core.entity.OEntityManager.setClassHandler(OEntityManager.java:207) at com.orientechnologies.orient.object.db.OObjectDatabaseTx.init(OObjectDatabaseTx.java:775) at com.orientechnologies.orient.object.db.OObjectDatabaseTxPooled.reuse(OObjectDatabaseTxPooled.java:53) at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.reuseResource(ODatabasePoolBase.java:77) at com.orientechnologies.orient.core.db.ODatabasePoolBase$1.reuseResource(ODatabasePoolBase.java:61) at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:69) at com.orientechnologies.common.concur.resource.OReentrantResourcePool.getResource(OReentrantResourcePool.java:63) at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:149) at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:134) at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:119)
Hi, we will use new pool since 2.0 so it will be fixed automatically.
@laa this is almost done in 2.0. isn't ? if it's just close it
Hi, Nope it is not yet. But we are close.
So how do I work around it? I can't upgrade to 2.0 since it isn't released.
We will release 2.0-M3 at Monday. And will release 2.0 during few weeks.
Fixed in https://github.com/orientechnologies/orientdb/issues/2901