I am trying to write a simple node application that uses the dse node driver to create some vertices and then to retrieve the created vertices for use in creating edges. The actual vertex retrieval traversals are in the groovy code that I'm submitting to DSE. My code for retrieving the vertices looks like:
g.V().hasLabel('someVertex').has('id', 'myId').next();
There is a vertex search index on my id
property. Unfortunately, I get an error:
FastNoSuchElementException
The same groovy query works perfectly in the Gremlin REPL. The query also works if I take out the hasLabel
call.
I thought that perhaps there was an eventual consistency issue, so I wrote a while loop in groovy that checks for the count of the traversal to be greater than zero. It never returns.
This same application works perfectly against my Titan graph.
Am I perhaps not understanding something about implicit transactions in DSE?
Edit: The code works if I wait 10 seconds after creating the vertices.