Binary protocol: passing class and no rid has no effect
When performing a RECORD_CREATE over the binary protocol, passing the class and no rid has no effect.
The discussion can be followed here:
https://groups.google.com/forum/embed/?place=forum/orient-database&theme=default&fragments=true&showsearch=true&showtabs=true&hideforumtitle=true&hidesubject=true&parenturl=http%3A%2F%2Fwww.orientechnologies.com%2Factive-user-community%2F#!topic/orient-database/eGX0PNpOcIU
Hi @nethertek,
I investigate a bit, and actually the protocol wasn't designed for resolve the clusterId server side, but should be done client side. also like you see in the (documentation)[http://www.orientechnologies.com/docs/last/orientdb.wiki/Network-Binary-Protocol.html#request_record_create] the clusterId is not returned after the create operation, is returned just the position inside the cluster.
for allow this we have to review the protocol specification and return also the clusterId.
so i think if you can just solve it client side, anyway we will think about this improvement.
We definitely need it for sharding, otherwise the client has to know the cluster selection strategy. @tglman please could you update the binary protocol supporting returning of clusterId?
Hi @tglman,
I agree with what you say. It used to work for us this way, before 2.0 release.
However, since 2.0, the client has no way of knowing the clusterid, since each node has been automagically assigned a different clusterid. Passing the master clusterid results in "com.orientechnologies.orient.server.distributed.ODistributedException: Error on inserting into cluster 'sms' where local node 'node_a' is not the master of it, but it's 'node_b' [ 18 ]".
If we could go back to the way it was in pre 2.0, this would not present a problem.
Going to implement it ASAP because of the cluster selection strategy
should be fixed, create a new version of the protocol with the clusertId in the RECORD_CREATE response, it's seems work. update also the documentation.
Great, so have you already tested retro-compatibility?