Divij Vaidya created TINKERPOP-2722:
---------------------------------------

             Summary: WithResult lifecycle state should not rollback trx on 
exception
                 Key: TINKERPOP-2722
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2722
             Project: TinkerPop
          Issue Type: Bug
          Components: server
    Affects Versions: 3.5.2
            Reporter: Divij Vaidya


*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]
 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to