0
votes

I am creating a distributed database in orientDB 2.2.6 with 3 nodes, namely master1, master2 and master3. I modified the hazelcast.xml and orientdb.server.config.xml files on each of the nodes. I used a common default-distributed-db-config.json on all 3 nodes which looks like as shown below.

{
   "autoDeploy": true,
  "readQuorum": 1,
  "writeQuorum": "majority",
  "executionMode": "undefined",
  "readYourWrites": true,
  "failureAvailableNodesLessQuorum": false,
  "servers": {
    "*": "master"
  },
  "clusters": {
    "internal": {
    },
   "address": {
     "owner" : "master1",
     "servers": [ "master1" ]
   },
   "address_1": {
      "owner" : "master1",
      "servers" : [ "master1" ]
   },
    "ip": {
      "owner" : "master2",
      "servers" : [ "master2" ]
    },
   "ip_1": {
      "owner" : "master2",
      "servers" : [ "master2" ]
   },
   "id": {
      "owner" : "master3",
      "servers" : [ "master3" ]
   },
   "id_1": {
      "owner" : "master3",
      "servers" : [ "master3" ]
   },
   "*": {
      "servers": [ "<NEW_NODE>" ]
    }
  }

}

Then I started the distributed server in the master1 machine, master2 and master3 in this order and let them synchronize the default DB. Then I created a database and three classes(Address, IP, ID) and their properties and indexes in the master1 machine. As I mentioned in the default-distributed-db-config.json file, Address class has two clusters and they are residing in the master1 machine. Class IP has two clusters and they reside in master2 machine.

When I insert values into Address class, as expected they are getting into master1 machine's clusters, following the round-robin strategy. But when I insert values for IP from the master2 machine they are creating a cluster in master1 and inserting into the new cluster. Basically, all the values are getting into master1 machine. When I do List Clusters, the clusters in master2 and master3 machines are empty.

So, I could not distribute the data across the three nodes. It basically stores the data into single machine. How to shard the data ? Is there any issue with the way I am trying to insert the data ?

Thanks

1

1 Answers

0
votes

In current OrientDB releases, write operations (create/update/delete) are not forwarded. only the reads are. For this reason, the client should be connected to the server that handles the cluster you want your data written to.

Usually, this isn't a problem, because a local cluster is selected, but if you want to write on a specific cluster on a remote server this is not supported yet.