-
Notifications
You must be signed in to change notification settings - Fork 872
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
Error of transitioning to 1.7-rc1 from 1.6.3 #2114
Comments
Odyseas, |
Andrey, |
Hi, yes, |
Andrey,
|
Yes, you are right. You do not need 3 commits if you have links between records and these records are not stored, you should pass records itself. Why you do not use edges but LINKSET ? |
Andrey, |
It should be more efficient if you can afford to spend time to migrate to this approach. |
It was a lot of work to migrate from the OGraphDatabase APi to use a mixture of Blueprint and raw OrientDB APi so changing how we store this association is not too bad if it will be more efficient. One advantage of using edges is that we won't have to build forward and backward links to the data manually. Thanks, Odysseas |
I am working on converting the use of a LINKSET into using a edges from the parent node to all the children nodes. As you suggested I am trying to achieve this within one transaction but I am running into the same type of exception again (see the exception below). The exception comes up while trying to save the out link on the document: public OrientEdge addEdge(String label, final OrientVertex inVertex, final String iClassName, final String iClusterName, ...
} [2014-03-11 20:27:34,477]ERROR 53764[taskExecutorFileLoaderMap-3] - org.openhie.openempi.entity.dao.orientdb.EntityDaoOrientdb.saveRecords(EntityDaoOrientdb.java:127) - Failed while trying to save a set of records of entity: person due to com.orientechnologies.orient.core.index.OIndexException: Error during loading of record with id : #11:-2 |
Andrey, |
Andrey, |
Yes, you have found out issue ? |
I am finding that after the commit I am still getting some temporary ids but I want to confirm this before I waste your time. I will let you know if I confirm it. Thanks. |
We fixed similar in 1.7-rc2 snapshot according to reports it is already pretty stable could you try it ? |
Good news Andrey. With 1.7-rc2 I am not having the problem any more. I switched to using edges instead of LINKSETs to store the one to many association and I see that it is automatically using lightweight edges to store the associations. Thanks for your help. |
Andrey,
I identified the issue in the previous test code I sent to you. In order to create vertex properties of type LINK or LINKSET I have to use the native API. In the following code, I simulate what it is that I am trying to do that is running into issues. Every time a new record is added (or a group of records) we are trying to update an index we maintain. The index is stored in the form of a class that has two properties, a key and a value which is a set of record pointers that have this key value. We are trying to update this index using a separate thread so that we can decouple the original request to create the record from the internal index update. The problem is that the record pointer is a temporary ID as opposed to a persisted one so that later one when we try to use the index, the records are not found in the database. Do you have any suggestions on what we are doing wrong or how to fix it?
Thanks,
Odysseas
public class TestOrientDbConcurrency extends TestCase
{
private final static String DB_URL = "plocal://mnt/sysnet/person-db";
private static final int THREAD_COUNT = 1;
// OrientVertexType personType = graph.createVertexType("persons");
// OrientVertexType addressType = graph.createVertexType("addresses");
}
The text was updated successfully, but these errors were encountered: