long clusterId = odb.getClusterIdByName(className);
String reqS = "select * from "+className+" where @rid > 
#"+Log.toString(qd.clusterId)+":"+Long.toString(CurrentHighRecordID);

(example: reqS = "select * from testdb where @rid > #7:436")

I have a structure that polls the orientdb 1.7 database as shown above for 
the latest records in a particular class.  This works fine to retrieve any 
new records.  However, my understanding is that this will likely no longer 
work in an orientdb 2.0 distributed environment, as each className may now 
have multiple clusterIds, which also means that each cluster would have its 
own highest RecordID to compare to.  Is there a better way I should be 
doing this (ie. maybe a class-wide highest recordID that only increases), 
or will I need to get a list of clusterIds for a className, then perform a 
separate select request for each clusterId that is returned?

I thought of possibly adding a "logRid" field, but this may also be tricky 
in distributed mode since orientdb doesn't currently support 
auto-increment.  I did come across this (
https://github.com/orientechnologies/orientdb/issues/3196) - if orientdb 
2.0 now supports distributed transactions, this could be an option as well.

Appreciate any ideas you have on this.  Thanks!

-- 

--- 
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.

Reply via email to