-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOCK not released in SQL UPDATE SET WHERE LOCK RECORD #2866
Comments
the same problem in #2840 |
…2866 Conflicts: core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLSelect.java
Conflicts: core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLSelect.java
In a distributed environment running on localhost , with three instances of dserver up and running . i get this exception Apr 02, 2015 2:10:17 PM com.orientechnologies.common.log.OLogManager log ................................................................. at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.executeOnLocalNode(OHazelcastPlugin.java:757) My Code : package com.anmol.sequencer; import com.tinkerpop.blueprints.impls.orient.OrientGraph; public class Mymain {
} package com.anmol.sequencer; import com.tinkerpop.blueprints.impls.orient.OrientGraph; public class myClient extends Thread {
} package com.anmol.sequencer; import com.orientechnologies.orient.core.sql.OCommandSQL;
} NEED TO FIX THIS URGENTLY -- any help appreciated |
I am trying use SQL command to update record in muti-thread enviroment
it works fine when sql doesn't contain statement "where condition"
ex:
update #10:0 INCREMENT count = 1 lock record
update #10:0 set count = 1 lock record
but if I use statement "where" in SQL, the first thread run succeed, but it didn't release the lock for the record,
then the other threads hung until OLockException been throw
ex:
update #10:0 SET count = 100 where count < 50 lock record
update #10:0 INCREMENT count = 1 where count < 50 lock record
test code:
Exception:
Caused by: com.orientechnologies.common.concur.lock.OLockException: Timeout (30000ms) on acquiring resource '#10:0' because is locked from another thread
at com.orientechnologies.common.concur.lock.OLockManager.acquireLock(OLockManager.java:104)
at com.orientechnologies.common.concur.lock.OLockManager.acquireLock(OLockManager.java:71)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.acquireWriteLock(OStorageEmbedded.java:187)
at com.orientechnologies.orient.core.tx.OTransactionAbstract.lockRecord(OTransactionAbstract.java:100)
at com.orientechnologies.orient.core.id.ORecordId.lock(ORecordId.java:266)
at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:1486)
at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.readRecord(OLocalPaginatedStorage.java:753)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:250)
... 23 more
database: plocal document
I test on Ver-1.7.8, Ver-1.7.9, Ver-2.0 M2, all have the issue,
by the way, I think this issue is the same with issue #2088
The text was updated successfully, but these errors were encountered: