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

WithResult lifecycle state should not rollback trx on exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.5.2
    • None
    • server
    • None

    Description

      Current behaviour:

       

      At AbstractEvalOpProcessor, when we define the withResult lifecycle state, we rollback the transaction if an exception occurred while executing the state. [1]

      However, it's the responsibility of afterFailure lifecycle state to handle any failure in prior lifecycle states (such as withResult) and hence, should be the right place to call rollback on a transaction. 

      In the current model, the transaction rollback is called twice, once at  [1] and again at  [2]

      Proposal

      As part of this JIRA, we should remove any transaction handling from the catch block at  [1]i.e. comment out this line: https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java#L262 

       [1]https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/AbstractEvalOpProcessor.java#L262

       

       [2]https://github.com/apache/tinkerpop/blob/3a5917be789612acb31a7043f47f67c6e16b31f6/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java#L304 

      Attachments

        Activity

          People

            Unassigned Unassigned
            divijvaidya Divij Vaidya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: