Have you read http://www.orientechnologies.com/docs/last/orientdb.wiki/Distributed-Sharding.html ?
On 27 January 2015 at 05:53, Leng Sheng Hong <[email protected]> wrote: > I have a question on how auto sharding work. This is my assumption on v2.0 > using the default configurations: > > 1) setup database on node 1, start in distributed mode > 2) start node 2 in distributed mode > 3) node 1 will send and deploy DB on node 2 > 4) app insert a new document of a class into the DB will automatically go > into node 1, then node 2 in round robin fashion. > > when i look at the databases/mydb/distributed-config.json it contains new > clusters of node 2 which is handled on both node?? > { > "@type": "d", > "@version": 0, > "version": 14, > "autoDeploy": true, > "hotAlignment": false, > "executionMode": "undefined", > "readQuorum": 1, > "writeQuorum": 2, > "failureAvailableNodesLessQuorum": false, > "readYourWrites": true, > "clusters": { > "@type": "d", > "@version": 0, > "internal": { > "@type": "d", > "@version": 0 > }, > "index": { > "@type": "d", > "@version": 0 > }, > "*": { > "@type": "d", > "@version": 0, > "servers": [ > "node1", > "node2", > "<NEW_NODE>" > ] > }, > "orole_node2": { > "@type": "d", > "@version": 0, > "servers": [ > "node1", > "node2", > "<NEW_NODE>" > ] > }, > "mytable_node2": { > "@type": "d", > "@version": 0, > "servers": [ > "node1", > "node2", > "<NEW_NODE>" > ] > }, > > > Now if i tried to insert 10 records from my app with the Java api > document.save() into mytable > all the records i get is saved with cluster ID of node2. > > So, how is this data distributed? It never uses node1 at all. > > > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
