-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autosharding Insert Cannot find best cluster for class #3370
Comments
Please could you try OrienDB 2.0-rc2? |
This seems to fixed with the latest version on the error cannot find best cluster class. Now i can insert from both nodes and they will sync without error. However cluster selection doesn't work If you try to set it through the studio interface it will always default back to local instead of round robin which is what is chosen. |
You cannot change clusterselection with distributed cfg, because "local" is always injected. |
oh, so what will happen here when i insert a new record from Java API? Will orientdb still insert it in a round robin fashion to either node 1 or node 2? Or is it always going to be node 1? |
If the request is taken by node1 will go to the cluster where node1 is master. The same for node2. Look at the docs: http://www.orientechnologies.com/docs/last/orientdb.wiki/Distributed-Sharding.html |
Ok I see, so I shouldn't actually test this through studio interface as it seems to only choose the node where it is hosted on. |
It seems that even inserting from Java api it will always choose the 2nd node. I explained my experience here: |
Ok, I'll respond in the forum. |
thanks! |
I still see this with 2.0.2: Caused by: com.orientechnologies.common.exception.OException: Cannot find best cluster for class '...' on server '...'. ClusterStrategy=local
at com.orientechnologies.orient.server.distributed.OLocalClusterStrategy.readConfiguration(OLocalClusterStrategy.java:90)
at com.orientechnologies.orient.server.distributed.OLocalClusterStrategy.getCluster(OLocalClusterStrategy.java:60)
at com.orientechnologies.orient.core.metadata.schema.OImmutableClass.getClusterForNewInstance(OImmutableClass.java:273)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2237)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:117)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1704)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1695)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:75) |
@p1tz do you have the code that cause that problem? |
I have 2 servers nodes with orientdb 2.0-rc1 distributed mode running. Both database are synced. I have tried to enable autosharding following the manual at http://www.orientechnologies.com/docs/last/orientdb.wiki/Distributed-Sharding.html and create my claases.
alter database minimumclusters 4
The DB clusterSelection was roundrobin. However when i insert records it's always using the default cluster, no other clusters are used to store the new records.
So i tried to alter the cluster selection for the class: ALTER CLASS MyProfile CLUSTERSELECTION roundrobin
Tried to create new record, it's still using the default #18 cluster. After changing to another clusterselection
ALTER CLASS MyProfile CLUSTERSELECTION balanced
It's still the same, however now when i insert new record from server 2, it will complai:
com.orientechnologies.common.exception.OException: Cannot find best cluster for class 'MyProfile'. ClusterStrategy=local [ONetworkProtocolHttpDb]
But it's still fine on server 1 but still only the default cluster is used. (which is the 1st DB that is deploy). What else is needed to be configured to New records to fully utilize the clusters automatically?
Name SuperClass Alias Abstract Clusters Default Cluster Cluster Selection Records Actions
MyProfile [18,19,20,21] 18
The text was updated successfully, but these errors were encountered: