Skip to content
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 UPDATE-PESSIMISTIC LOCK #2088

Closed
kowalot opened this issue Mar 4, 2014 · 10 comments · Fixed by #2136
Closed

LOCK not released in UPDATE-PESSIMISTIC LOCK #2088

kowalot opened this issue Mar 4, 2014 · 10 comments · Fixed by #2136
Assignees
Milestone

Comments

@kowalot
Copy link
Contributor

kowalot commented Mar 4, 2014

Having any object and trying to do update operation in two threads

THREAD 1:
orientdb {test}> UPDATE #51:0 SET X=1 LOCK RECORD WHERE Y.size() > 0
Updated record(s) '0' in 0,006000 sec(s).
THREAD 2:
UPDATE #51:0 SET X=1 LOCK RECORD WHERE Y.size() > 0
HUNG INDEFINITELY

Properties X,Y are not existed
Y.size()>0 is false

@kowalot
Copy link
Contributor Author

kowalot commented Mar 10, 2014

Luca,
I prepared fix for it, but seems that I can't make a successfull build with recent snapshot. Could you please confirm me if
ant clean test and mvn clean install
work for you?

@andrii0lomakin
Copy link
Member

@kowalot you can always check build status using official CI server http://helios.orientechnologies.com/ it was never in our practice when CI builds were successful but developer build fails, on CI we run much more (several thousands test cases ) tests than on dev. environment.

@kowalot
Copy link
Contributor Author

kowalot commented Mar 12, 2014

Hi Andrey, finally I tackled the problem. I guess the team is using Macs or Linux.
On Windows, paths used in asserts are translated from \ to /. It leads to false fails. I will add patch for it in this issue.

@kowalot
Copy link
Contributor Author

kowalot commented Mar 13, 2014

Andrey, could you help me?
I am trying to run mvn clean install on Windows
but one test case cant delete file which actually exists
https://github.com/orientechnologies/orientdb/blob/master/core/src/test/java/com/orientechnologies/orient/core/index/hashindex/local/cache/ReadWriteDiskCacheTest.java#L83

It returns false, so probably stream isn't closed or something.
Any clue?

@andrii0lomakin
Copy link
Member

Do you use master branch ? It is already fixed in develop.

On Thu, Mar 13, 2014 at 8:35 PM, Pawel Kowalski notifications@github.comwrote:

Andrey, could you help me?
I am trying to run mvn clean install on Windows
but one test case cant delete file which actually exists

https://github.com/orientechnologies/orientdb/blob/master/core/src/test/java/com/orientechnologies/orient/core/index/hashindex/local/cache/ReadWriteDiskCacheTest.java#L83

It returns false, so probably stream isn't closed or something.
Any clue?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2088#issuecomment-37570401
.

Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

@kowalot
Copy link
Contributor Author

kowalot commented Mar 14, 2014

I use develop.
For instance I made this change just to fix this test case but there is more
https://gist.github.com/anonymous/9544266#file-dbdeletetest-java-L54

@kowalot
Copy link
Contributor Author

kowalot commented Mar 14, 2014

I have got following error but don't now how to globally change it

java.util.concurrent.ExecutionException: java.lang.AssertionError: expected local:E:\JavaProjects\releases\orientdb-community-1.7-rc2-SNAPSHOT\databases\demo-6 but was:local:E:/JavaProjects/releases/orientdb-community-1.7-rc2-SNAPSHOT/databases/demo-6
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at com.orientechnologies.orient.test.database.auto.MultipleDBTest.testDocumentMultipleDBsThreaded(MultipleDBTest.java:240)
Caused by: java.lang.AssertionError: expected:local:E:JavaProjectsreleasesorientdb-community-1.7-rc2-SNAPSHOTdatabasesdemo-6 but was:local:E:/JavaProjects/releases/orientdb-community-1.7-rc2-SNAPSHOT/databases/demo-6
at com.orientechnologies.orient.test.database.auto.MultipleDBTest$2.call(MultipleDBTest.java:185)
at com.orientechnologies.orient.test.database.auto.MultipleDBTest$2.call(MultipleDBTest.java:160)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

@kowalot
Copy link
Contributor Author

kowalot commented Mar 14, 2014

Generated test suite vars looks following

parameter name="testPath" value="E:\JavaProjects\OrientDB-kowalot\orientdb-parent\tests"
parameter name="path" value="E:\JavaProjects\releases\orientdb-community-1.7-rc2-SNAPSHOT\databases\demo"/
parameter name="url" value="local:E:\JavaProjects\releases\orientdb-community-1.7-rc2-SNAPSHOT\databases\demo"/

@andrii0lomakin
Copy link
Member

Ok. Pawel at once we release 1.7-rc2 I will take a look on it.

@kowalot
Copy link
Contributor Author

kowalot commented Mar 14, 2014

I fixed it partially in pull request #2127. Ant clean test works now.

kowalot added a commit to kowalot/orientdb that referenced this issue Mar 17, 2014
kowalot added a commit to kowalot/orientdb that referenced this issue Mar 17, 2014
lvca added a commit that referenced this issue Mar 17, 2014
#2088 LOCK not released in SQL UPDATE-PESSIMISTIC LOCK
@lvca lvca added this to the 1.7 milestone Mar 17, 2014
@lvca lvca self-assigned this Mar 17, 2014
@lvca lvca modified the milestones: 1.7rc2, 1.7 Mar 17, 2014
@lvca lvca closed this as completed Mar 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants