orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Inconsistent replication of data in asynchronous mode of distributed orientdb

Open rinkymangal2010 opened this issue 11 years ago • 6 comments

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:

  1. I have inserted 200K documents at "node1" with the rate of ~2400 documents/second.
  2. Wait for replication of all 200k documents at node2 and node3.
  3. Deleted data from "node2" and waited for deletion to replicate on all other nodes(node2 and node3).
  4. Again inserted data at "node1" with the same rate.
  5. Again, I was waiting for replication of all 200k documents at node2 and node3.
  6. But no data replicate to "Node2", from where the data were deleted.
  7. While all the data is replicated to node3.

Tried with: orientdb-2.0.3 orientdb-2.0.6-SNAPSHOT

Regards, Rinky Mangal

rinkymangal2010 avatar Mar 20 '15 12:03 rinkymangal2010

To reproduce the issue easily you may use only 1 document.

I have reproduced the same issue with 1 document.

Please follow below steps:

  1. Insert 1 documents at "node1".
  2. Wait for replication of document at node2 and node3.
  3. Deleted data from "node2" and waited for deletion to replicate on all other nodes(node2 and node3).
  4. Again inserted 1 same document at "node1".
  5. Again, wait for replication document at node2 and node3.
  6. You will found no data replicated to "Node2", from where the data was deleted.
  7. 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

rinkymangal2010 avatar Mar 20 '15 13:03 rinkymangal2010

There are two points to note about this issue:

  1. 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');
  2. 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

rinkymangal2010 avatar Mar 23 '15 10:03 rinkymangal2010

Please could you retry against last 2.0.6-SNAPSHOT?

lvca avatar Mar 25 '15 19:03 lvca

@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

rinkymangal2010 avatar Mar 26 '15 13:03 rinkymangal2010

This could be the same as for #2914 just fixed.

lvca avatar Jul 30 '15 17:07 lvca

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.

lvca avatar Aug 05 '15 09:08 lvca