Currently I'm working on testing of adding many edges to the same vertex
from concurrently. I found, that every time I add another one edge to
vertex, it's version increase. So I catch
the OConcurrentModificationException and retry again. But I found that
exception occurs only when I run test first time. When I run test second
time and add more edges to the same vertex, it's version doesn't increase
and exception doesn't occur
// this snipet of code executes in many
for (int j = 0; j < iterationCount; j++) {
while (true) {
try {
t2.begin();
OrientVertex luca =
t2.addVertex("class:Person");
luca.setProperty("name", "Luca");
luca.addEdge("Owns", singleVertex);
t2.commit();
break;
} catch (OConcurrentModificationException e) {
t2.rollback();
} catch (Exception ex) {
ex.printStackTrace();
t2.rollback();
break;
}
}
}
Btw, is there a better way to do it? I tried to
this: http://www.orientechnologies.com/docs/last/orientdb.wiki/SQL-batch.html
But with no luck, it added not all the edges even if I set retry count to
1M.
Thanks, Vlad
--
---
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.