Yes, but this seems to be the same as 1.7? I was wondering now what does auto sharding means in 2.0, so inserting to Class MyTable will not automatically goes to the nodes connected in round robin fashion? but always goes to the default node? For me, it always goes to the other node rather than the default node. So I am a bit confused with how distributed sharding works when inserting to a Class without specifying a cluster.
On Wednesday, 28 January 2015 06:13:12 UTC+8, Lvc@ wrote: > > 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] > <javascript:>> 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] <javascript:>. >> 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.
