Hi Chaitanya, RIDs are unique even in distributed environment. If the same record is present in two different db nodes, then both copies of the record will have the same RID of course. OrientDB has a particular strategy to guarantee that RIDs are uniquely assigned in distributed mode: the ownership of every cluster is assigned to only a single db instance, and only that db node is allowed to do INSERT operations on that cluster (these are the operations that generate RIDs). So if you have a class (say Person) on two different nodes (say node1 and node2), you will have two different clusters for that (eg, "person_node1" belonging to "node1" and "person_node2" belonging do "node2"). If you execute and INSERT INTO Person on node1, then the record will be written in cluster "person_node1", so its cluster id (the first part of the RID) will be the number of that cluster, if you do the insert on node2 the record will be written in cluster person_node2 so you will have a different cluster id. In this way OrientDB allows conflicts in RID assignment
Luigi 2015-06-15 8:43 GMT+02:00 Chaitanya <[email protected]>: > Hi > > I am new to orientdb. Is RID unique to a record even in distributed > environment? > > Could anyone throw some light in how will RID places a better role in > Sharding and Replication. > > Thank you > Chaitanya > > -- > > --- > 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.
