Inconsistent replication of data in asynchronous mode of distributed orientdb
Hi,
I am not able to replicate data to other nodes of distributed cluster with 100% reliabilty.
I have setup a cluster of 3 nodes (node1, node2 and node3).
My default-distributed-db-config.json is like:
{ "autoDeploy": true, "hotAlignment": false, "executionMode": "asynchronous", "readQuorum": 1, "writeQuorum": 2, "failureAvailableNodesLessQuorum": false, "readYourWrites": true, "clusters": { "internal": { }, "index": { }, "*": { "servers" : [ "<NEW_NODE>" ] } } }
Steps to reproduce Issue:
- I have inserted 200K documents at "node1" with the rate of ~2400 documents/second.
- Wait for replication of all 200k documents at node2 and node3.
- Deleted data from "node2" and waited for deletion to replicate on all other nodes(node2 and node3).
- Again inserted data at "node1" with the same rate.
- Again, I was waiting for replication of all 200k documents at node2 and node3.
- But no data replicate to "Node2", from where the data were deleted.
- While all the data is replicated to node3.
Tried with: orientdb-2.0.3 orientdb-2.0.6-SNAPSHOT
Regards, Rinky Mangal
To reproduce the issue easily you may use only 1 document.
I have reproduced the same issue with 1 document.
Please follow below steps:
- Insert 1 documents at "node1".
- Wait for replication of document at node2 and node3.
- Deleted data from "node2" and waited for deletion to replicate on all other nodes(node2 and node3).
- Again inserted 1 same document at "node1".
- Again, wait for replication document at node2 and node3.
- You will found no data replicated to "Node2", from where the data was deleted.
- While the data is replicated to node3.
Note: Also, I was creating index by applying unique constraint on it like:
create index key_usertable_Index on usertable(key) unique;
Please let me know, how can i handle this scenario.
Thamks, Rinky Mangal
There are two points to note about this issue:
- Replication works fine if there is no unique constraint like: create class usertable ; CREATE PROPERTY usertable.key string; CREATE INDEX key_ usertable_Index on usertable(key) NOTUNIQUE; insert into usertable (key, field1) values ('key1', 'value1');
- Issue can be observed while inserting the data at the same index which were deleted previously and at the node from where the deletion operation were performed.
Thanks, Rinky Mangal
Please could you retry against last 2.0.6-SNAPSHOT?
@lvca Issue still persist.
I have tested for the same with the following snapshot: orientdb-community-2.0.6-20150325.091043-11-distribution.tar.gz
Link address: https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-community/2.0.6-SNAPSHOT/orientdb-community-2.0.6-20150325.091043-11-distribution.tar.gz
This could be the same as for #2914 just fixed.
This issue should be the same as for #2914. I'm closing this issue. In case you're able to reproduce it again against last 2.1, please comment/reopen this issue. Thanks.