We have been struggling to create vertices on fly at the same time adding it to newly created class and add edge to it using regular blueprint query in multithreaded environment as some of the caching is causing problem and every time a query is made it looks for the older versions of the vertices . We have tried disabling the local cache after taking connection from pool by( graph.getrawGraph().getLocalCache().clear())
But this seems to work in certain scenarios. We are using transactions and retry mechanisms (to overcome the concurrency issues) wherever we are doing updates. But somehow at some places the older versions are getting caught and therefore the application is throwing null pointer exceptions.
To solve the existent problem for vertices we are querying the database directly through select query firing using command : Iterable nodes = (Iterable) graph.command(new OCommandSQL("SELECT * FROM v WHERE " + propName + "='" + propValue + "' ")).execute();
This works fine somehow . But now this query returns us the vertex with class value = null as : v(null)[some@Rid], but actually after creation ideally it should come with the class name too. This is creating difficulty in adding edge to that vertex. Please enlighten us in this regard as what can be the recommended procedures to handle these kind of situations.
Thanks And Regards
Varun Tahin