Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2913

Ensure that if tx.commit() is called remotely it does not hang for graphs without transactions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.5.5
    • 3.6.7, 3.7.2
    • dotnet, go, javascript, python
    • None

    Description

      Javascript has been reported to hang if you do a tx.commit() and the remote graph does not support transactions (i.e. TinkerGraph). It should return an exception similar to how Java does:

      gremlin> tx.commit()
      Transaction commit for Optional.empty failed
      Type ':help' or ':h' for help.
      Display stack trace? [yN]y
      ....
      Caused by: java.util.concurrent.CompletionException: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Graph does not support transactions
      	at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
      	at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1947)
      	at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:123)
      	at org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:175)
      	at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.hasNext(DriverRemoteTraversal.java:110)
      	at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal.hasNext(DriverRemoteTraversal.java:70)
      	at org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTransaction.closeRemoteTransaction(DriverRemoteTransaction.java:95)
      	... 70 more
      Caused by: org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Graph does not support transactions
      	at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:245)
      	at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:200)
      	at ....
      

      Check all non-java drivers and provide tests to enforce the appropriate behavior. It would be worth examining behavior of all tx methods like rollback() and close() as well. can this be somehow part of the gherkin test suite rather than one-off tests?

      Attachments

        Activity

          People

            valentyn Valentyn Kahamlyk
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: