-
Notifications
You must be signed in to change notification settings - Fork 871
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
Timeout on acquiring lock when insert duplicated record in distributed mode #7391
Comments
In your pseudo code to reproduce the problem I don't see any edge. It's weird that you have a |
yes, no need edge. I just tested it on win 10, same exception.
|
What record is #13:1 ? Can you print here the result of |
the result is empty, seem orientdb server catch the ORecordDuplicatedException and commit fail.
|
additionally, there is following log in orient-server.log.0 after changing log level to FINE, seems orientdb server catch the ORecordDuplicatedException but not unlock the record.
|
This is interesting. So the problem is on duplicated key in the same distributed transaction? |
yes |
In branch 2.2.x we improved the management of timeouts with distributed. Could you please try with 2.2.20-SNAPSHOT if the error persists? |
I tried 2.2.20-SNAPSHOT from git, the code stuck at line "graph.commit()", still failed.
|
We pushed a fix a few hours ago that seems the very same bug. Could you please build an OrientDB distribution from 2.2.x and check if this is working now? Thanks in advance. |
I tried to start orientdb with -Ddistributed=true in IDEA, but have following exception, did I miss something.
|
Which release are you using? The error is |
I can start it using branch 2.2.18, but after checkout to 2.2.x , it fail to start . with same config. |
the test case passed just now, thanks. |
Cool, I'm closing this exception, in case the problem persists, please comment this issue, so I can reopen it. Thanks. |
Just to confirm. I had this same problem with Object API in distributed mode, using 2.2.20 it did not throw me this exception and halts everything, in my case it deadlocks without a timeout. After building 2.2.21 snapshot all is fine |
I'm using orientdb 2.22 in distribute environment, when i use concurrent thread to write the data and it occurs the exception below is my code: i will create the sql by my java code, and then using java api to execute it. java code: sql: I have some questions: Thanks |
I am using Orient 3.0.10 and facing same issue on concurrent write. I have created following setup -
It works well for 2 threads but as number of threads increases, it times out. Any clues? |
Same issue in 3.0.13. Any ideas how we can fix this? |
OrientDB Version: 2.2.18
Java Version: 1.8.0_73
OS: el6
issue:
when inserting duplicated record (with unique index) in distributed mode, have following exception:
ODistributedRecordLockedException: Timeout (3938ms) on acquiring lock on record #13:1 on server 'node2'. It is locked by request 0.14
For version 2.1.x, OrientDB will throw ORecordDuplicatedException, which I think make sense. because I can handle it immediately without delay.
why v2.2.x does not throw ORecordDuplicatedException, did I miss something?
Expected behavior
should throw ORecordDuplicatedException
Actual behavior
ODistributedRecordLockedException: Timeout (3938ms) on acquiring lock on record #13:1 on server 'node2'. It is locked by request 0.14
Steps to reproduce
create unique index:
drop class orion_v unsafe;
create class orion_v extends v;
create property orion_v.pk string;
alter property orion_v.pk mandatory true;
drop index idx_orion_v_pk;
create index idx_orion_v_pk on orion_v(pk) unique_hash_index;
run java code:
String pk1="11";
graph.addVertex("class:orion_v","pk",pk1);
graph.addVertex("class:orion_v","pk",pk1);
graph.commit();
The text was updated successfully, but these errors were encountered: