{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3302","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3302/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3302/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3302/events","html_url":"https://github.com/orientechnologies/orientdb/issues/3302","id":53159644,"number":3302,"title":"OTimeoutException: Timeout on acquiring exclusive lock against resource of class: class OIndexNotUnique with timeout=5000","user":{"login":"adithyank","id":9428921,"avatar_url":"https://avatars.githubusercontent.com/u/9428921?v=3","gravatar_id":"","url":"https://api.github.com/users/adithyank","html_url":"https://github.com/adithyank","followers_url":"https://api.github.com/users/adithyank/followers","following_url":"https://api.github.com/users/adithyank/following{/other_user}","gists_url":"https://api.github.com/users/adithyank/gists{/gist_id}","starred_url":"https://api.github.com/users/adithyank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adithyank/subscriptions","organizations_url":"https://api.github.com/users/adithyank/orgs","repos_url":"https://api.github.com/users/adithyank/repos","events_url":"https://api.github.com/users/adithyank/events{/privacy}","received_events_url":"https://api.github.com/users/adithyank/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/core","name":"core","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"laa","id":105066,"avatar_url":"https://avatars.githubusercontent.com/u/105066?v=3","gravatar_id":"","url":"https://api.github.com/users/laa","html_url":"https://github.com/laa","followers_url":"https://api.github.com/users/laa/followers","following_url":"https://api.github.com/users/laa/following{/other_user}","gists_url":"https://api.github.com/users/laa/gists{/gist_id}","starred_url":"https://api.github.com/users/laa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laa/subscriptions","organizations_url":"https://api.github.com/users/laa/orgs","repos_url":"https://api.github.com/users/laa/repos","events_url":"https://api.github.com/users/laa/events{/privacy}","received_events_url":"https://api.github.com/users/laa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/33","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/33/labels","id":897335,"number":33,"title":"2.0 Final","description":"2.0 Final version after the 2.0-RC","creator":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":56,"state":"open","created_at":"2014-12-09T14:13:06Z","updated_at":"2015-01-06T06:39:54Z","due_on":"2015-01-05T23:00:00Z","closed_at":null},"comments":3,"created_at":"2014-12-31T00:44:01Z","updated_at":"2015-01-06T07:10:49Z","closed_at":"2015-01-06T06:02:49Z","body":"OrientDB Version : 2.0-M3\r\n\r\nour software reads from doc db in multi threads while there is another only one thread creating records.......!\r\n\r\nWhat is the reason for this Exception???\r\nDoes this mean that the writing thread's transaction has not been committed/rolledback in 30 seconds. If yes, I want to give you another input that all our transactions are committed and closed within 5 seconds from the time of db.begin()\r\n\r\n```\r\ncom.orientechnologies.common.concur.OTimeoutException: Timeout on acquiring exclusive lock against resource of class: class com.orientechnologies.orient.core.index.OIndexNotUnique with timeout=5000\r\nOwner thread : Thread[InventoryDataPersister,5,main]\r\n        at sun.misc.Unsafe.unpark(Native Method)\r\n        at java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:152)\r\n        at com.orientechnologies.common.concur.lock.OReadersWriterSpinLock.releaseWriteLock(OReadersWriterSpinLock.java:170)\r\n        at com.orientechnologies.orient.core.index.hashindex.local.cache.OReadWriteDiskCache.openFile(OReadWriteDiskCache.java:150)\r\n        at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.resolveFileIdByName(OIndexRIDContainer.java:76)\r\n        at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.<init>(OIndexRIDContainer.java:53)\r\n        at com.orientechnologies.orient.core.index.OIndexMultiValues.putInSnapshot(OIndexMultiValues.java:163)\r\n        at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:948)\r\n        at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:626)\r\n        at com.orientechnologies.orient.core.tx.OTransactionOptimistic$CommitIndexesCallback.run(OTransactionOptimistic.java:93)\r\n        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:864)\r\n        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:455)\r\n        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:142)\r\n        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2261)\r\n        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2231)\r\n        at in.co.nmsworks.documenttdb.db.DocDB.commit(DocDB.java:482)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvWriter.addAll(RcaInvWriter.java:118)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvWriter.addAll(RcaInvWriter.java:76)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.dao.InventoryDAO.save(InventoryDAO.java:106)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.queue.InventoryDataPersister.saveDAOData(InventoryDataPersister.java:331)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.queue.InventoryDataPersister.processAddition(InventoryDataPersister.java:306)\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.queue.InventoryDataPersister.run(InventoryDataPersister.java:71)\r\n\r\n\r\n        at com.orientechnologies.common.concur.resource.OSharedResourceAdaptive.throwTimeoutException(OSharedResourceAdaptive.java:188) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.common.concur.resource.OSharedResourceAdaptive.acquireSharedLock(OSharedResourceAdaptive.java:165) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.common.concur.resource.OSharedResourceAdaptiveExternal.acquireSharedLock(OSharedResourceAdaptiveExternal.java:44) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.orient.core.index.OIndexMultiValues.get(OIndexMultiValues.java:62) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.orient.core.index.OIndexMultiValues.get(OIndexMultiValues.java:51) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:59) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.orient.core.index.OIndexTxAwareMultiValue.get(OIndexTxAwareMultiValue.java:272) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at com.orientechnologies.orient.core.index.OIndexTxAwareMultiValue.get(OIndexTxAwareMultiValue.java:40) ~[orientdb-core-2.0-M3.jar:2.0-M3]\r\n        at in.co.nmsworks.documenttdb.db.DocDB.getDocTypeObjects(DocDB.java:114) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvReader.getEntitiesByNonUniqueKeySearch(RcaInvReader.java:406) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvReader.getPointEntities(RcaInvReader.java:434) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvReader.buildImpactAnalysisDataHolderForCTP(RcaInvReader.java:337) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.inventory.store.RcaInvReader.buildImpactAnalysisDataHolderForCTP(RcaInvReader.java:324) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.impl.circuit.impact.node.constructor.impl2.CTPImpactAnalysisDataBuilder.buildImpactAnalysisData(CTPImpactAnalysisDataBuilder.java:40) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.impl.circuit.impl2.CircuitPlugHelper.getImpactAnalysisDataHolder(CircuitPlugHelper.java:129) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.impl.circuit.impl2.CircuitPlug.getImpactAnalysisDataHolder(CircuitPlug.java:234) ~[cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.impl.circuit.impl2.CircuitPlug.analyze(CircuitPlug.java:106) [cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.impl.circuit.impl2.CircuitPlug.onInventoryChange(CircuitPlug.java:265) [cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.plug.Plug.computeAndStore(Plug.java:121) [cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.server.PlugInvokationTask.getPlugResult(PlugInvokationTask.java:122) [cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.server.PlugInvokationTask.compute(PlugInvokationTask.java:67) [cygnetOTNMS.jar:?]\r\n        at in.co.nmsworks.cygnet.telecom.fault.rcasia.server.PlugInvokationTask.compute(PlugInvokationTask.java:38) [cygnetOTNMS.jar:?]\r\n        at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:93) [?:1.7.0_71]\r\n        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:334) [?:1.7.0_71]\r\n        at java.util.concurrent.ForkJoinWorkerThread.execTask(ForkJoinWorkerThread.java:604) [?:1.7.0_71]\r\n        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:762) [?:1.7.0_71]\r\n        at java.util.concurrent.ForkJoinPool.work(ForkJoinPool.java:646) [?:1.7.0_71]\r\n        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:398) [?:1.7.0_71]\r\n```\r\n\r\nBy code, I understand that I have to increase `OGlobalConfiguration.MVRBTREE_TIMEOUT` to workaround this problem.\r\n\r\nBut, `OGlobalConfiguration.MVRBTREE_TIMEOUT` is deprecated...?\r\nIs it the right way to increase this value or is there something else I have to do?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/68833631","html_url":"https://github.com/orientechnologies/orientdb/issues/3302#issuecomment-68833631","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/3302","id":68833631,"user":{"login":"laa","id":105066,"avatar_url":"https://avatars.githubusercontent.com/u/105066?v=3","gravatar_id":"","url":"https://api.github.com/users/laa","html_url":"https://github.com/laa","followers_url":"https://api.github.com/users/laa/followers","following_url":"https://api.github.com/users/laa/following{/other_user}","gists_url":"https://api.github.com/users/laa/gists{/gist_id}","starred_url":"https://api.github.com/users/laa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laa/subscriptions","organizations_url":"https://api.github.com/users/laa/orgs","repos_url":"https://api.github.com/users/laa/repos","events_url":"https://api.github.com/users/laa/events{/privacy}","received_events_url":"https://api.github.com/users/laa/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T07:10:49Z","updated_at":"2015-01-06T07:10:49Z","body":"It was done to prevent deadlock in very early versions of product, now it\r\nis not needed it will wait for some time but not indefinitely, lock uses\r\nqueue inside, so lock eventually will be acquired.\r\n\r\nOn Tue, Jan 6, 2015 at 8:36 AM, K Adithyan <notifications@github.com> wrote:\r\n\r\n> Making it 0 means it will wait indefinitely?\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/orientechnologies/orientdb/issues/3302#issuecomment-68831704>\r\n> .\r\n>\r\n\r\n\r\n\r\n-- \r\nBest regards,\r\nAndrey Lomakin."}}