andreachild commented on code in PR #3163: URL: https://github.com/apache/tinkerpop/pull/3163#discussion_r2229510927
########## tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerTransactionGraphTest.java: ########## @@ -1705,6 +1706,92 @@ public void shouldPreventDropUpdateVertexInConcurrentTransactions() { verifyCommittedSingleVertex(g, "updated"); } } + + @Test + public void readVertexShouldNotConflictWithDropAddUpdateVertexInSeparateTransaction() throws InterruptedException { + final TinkerTransactionGraph graph = TinkerTransactionGraph.open(); + final GraphTraversalSource g = graph.traversal(); + final GraphTraversalSource gtx = g.tx().begin(); + final int vertexId = 1; + + // commit the initial vertex + gtx.addV().property(T.id, vertexId).next(); + gtx.tx().commit(); + + // reader thread which is constantly reading the vertex ids in a separate transaction + CountDownLatch signal = new CountDownLatch(1); + Thread reader = new Thread(() -> { + while (signal.getCount() > 0) { + g.V().id().toList(); Review Comment: Added verification to check expected vertex ids (empty or single value of vertexId), same for the edge test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org