{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/8234","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/8234/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/8234/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/8234/events","html_url":"https://github.com/orientechnologies/orientdb/issues/8234","id":316725509,"number":8234,"title":"Distributing Shards Between Servers","user":{"login":"hossein-md","id":37771914,"avatar_url":"https://avatars3.githubusercontent.com/u/37771914?v=4","gravatar_id":"","url":"https://api.github.com/users/hossein-md","html_url":"https://github.com/hossein-md","followers_url":"https://api.github.com/users/hossein-md/followers","following_url":"https://api.github.com/users/hossein-md/following{/other_user}","gists_url":"https://api.github.com/users/hossein-md/gists{/gist_id}","starred_url":"https://api.github.com/users/hossein-md/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossein-md/subscriptions","organizations_url":"https://api.github.com/users/hossein-md/orgs","repos_url":"https://api.github.com/users/hossein-md/repos","events_url":"https://api.github.com/users/hossein-md/events{/privacy}","received_events_url":"https://api.github.com/users/hossein-md/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-23T09:11:31Z","updated_at":"2018-05-16T19:41:35Z","closed_at":null,"author_association":"NONE","body":"### OrientDB Version: <version here>  2.2.33\r\n### OS: <os here>  Linux\r\n\r\n## Expected behavior  \r\n<add here>  \r\n\r\nI have 3 servers and use the following configs (default-distributed-db-config.json):\r\n```\r\n{\r\n  \"autoDeploy\": true,\r\n  \"readQuorum\": 1,\r\n  \"writeQuorum\": \"majority\",\r\n  \"executionMode\": \"undefined\",\r\n  \"readYourWrites\": true,\r\n  \"newNodeStrategy\": \"static\",\r\n  \"servers\": {\r\n    \"*\": \"master\"\r\n  },\r\n  \"clusters\": {\r\n    \"internal\": {\r\n    },\r\n    \"shard_01\": {\r\n      \"servers\": [\"n01\"]\r\n    },\r\n    \"shard_02\": {\r\n      \"servers\": [\"n01\",\"n02\"]\r\n    },\r\n    \"shard_03\": {\r\n      \"servers\": [\"n03\"]\r\n    },\r\n    \"*\": {\r\n      \"servers\": [\"<NEW_NODE>\"]\r\n    }\r\n  }\r\n}\r\n```\r\nI insert some nodes (Using java api, graph model) I have 2 problem (Actually Three!)\r\n1) I expect the nodes go to every shard according to the policy \"e.g., round-robin\"\r\n2) I expect the size of database folder for 'n01' is more than the 'n02' and 'n03'\r\n\r\n## Actual behavior  \r\n<add here>  \r\n\r\nHere's my problems: \r\nFirst:\r\nAll the nodes go to the one server. e.g., if I use this `OrientGraph graph = new OrientGraph(n01-ip)` all the nodes go to the shard_01 (not even shard_02!)\r\nMy code is: `graph.addVertex(\"class:\" + className, properties)`\r\n\r\nSecond:\r\nThe size of database folder for servers 'n02' and 'n03' had been less than the size of database folder server 'n01' before I closed 'n02' and 'n03'. When I shutdown the 'n02' and 'n03' and delete their databases, the database is copied from n01 to n02 and n03 and the size of all the database folders are equal.\r\n\r\nThird: \r\nI can't read data! I use this code: ( FYI: keyName and keyValue is unique property)\r\n```\r\nIterator<Vertex> iterator = graph.getVertices(className + \".\" + keyName, keyValue).iterator();\r\n```\r\nAnd I get this error from my java output:\r\n\r\n```\r\nException in thread \"main\" com.orientechnologies.orient.server.distributed.ODistributedException: No active nodes found to execute command: sql.select rid from index:User.idNumber where key = ?\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\r\n\tat com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:449)\r\n\tat com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:400)\r\n\tat com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:283)\r\n\tat com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:167)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2362)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote$27.execute(OStorageRemote.java:1209)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote$2.execute(OStorageRemote.java:206)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:251)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.networkOperationRetry(OStorageRemote.java:203)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:214)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.command(OStorageRemote.java:1185)\r\n\tat com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)\r\n\tat com.orientechnologies.orient.core.index.OIndexRemoteOneValue.get(OIndexRemoteOneValue.java:46)\r\n\tat com.orientechnologies.orient.core.index.OIndexRemoteOneValue.get(OIndexRemoteOneValue.java:36)\r\n\tat com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:58)\r\n\tat com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:262)\r\n\tat com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:40)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getVertices(OrientBaseGraph.java:780)\r\n\tat graphdb.Orientdb.findVertex(Orientdb.java:10)\r\n```\r\nAnd this is from \"dserver.sh\":\r\n\r\n```\r\n11:38:42:910 WARNI I/O Error on distributed channel (clientId=8 reqType=121 error=java.io.InvalidClassException: com.orientechnologies.orient.core.sql.query.OBasicResultSet; no valid constructor)\r\n11:38:53:001 WARNI [n01] Timeout (10001ms) on waiting for synchronous responses from nodes=[n03, n02] responsesSoFar=[n02] request=(id=0.56 task=gossip timestamp: 1524467322999 lockManagerServer: n01)\r\n11:38:53:002 WARNI [n01]->[n03] Server 'n03' did not respond to the gossip message (db=myDB, timeout=10000ms), but cannot be set OFFLINE by configuration\r\n```\r\n\r\nDoes anyone run the Orientdb in the cloud way that all the servers haven't all the shards?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/389641566","html_url":"https://github.com/orientechnologies/orientdb/issues/8234#issuecomment-389641566","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/8234","id":389641566,"user":{"login":"saeedtabrizi","id":10245423,"avatar_url":"https://avatars2.githubusercontent.com/u/10245423?v=4","gravatar_id":"","url":"https://api.github.com/users/saeedtabrizi","html_url":"https://github.com/saeedtabrizi","followers_url":"https://api.github.com/users/saeedtabrizi/followers","following_url":"https://api.github.com/users/saeedtabrizi/following{/other_user}","gists_url":"https://api.github.com/users/saeedtabrizi/gists{/gist_id}","starred_url":"https://api.github.com/users/saeedtabrizi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saeedtabrizi/subscriptions","organizations_url":"https://api.github.com/users/saeedtabrizi/orgs","repos_url":"https://api.github.com/users/saeedtabrizi/repos","events_url":"https://api.github.com/users/saeedtabrizi/events{/privacy}","received_events_url":"https://api.github.com/users/saeedtabrizi/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T19:41:35Z","updated_at":"2018-05-16T19:41:35Z","author_association":"CONTRIBUTOR","body":"Hi @luigidellaquila \r\nI think this issue can be close .\r\nThanks"}}
{"actor":{"display_login":"saeedtabrizi"}}