kenhuuu commented on code in PR #3284:
URL: https://github.com/apache/tinkerpop/pull/3284#discussion_r2591601303


##########
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java:
##########
@@ -571,6 +582,13 @@ protected void handleGraphOperation(final Bytecode 
bytecode, final Graph graph,
                                     .statusMessage(t.getMessage())
                                     .statusAttributeException(t).create());
                         }
+
+                        if (destroySessionPostGraphOp) {
+                            // Destroy the session after a successful rollback 
due to error. Placed here rather than
+                            // in a finally block since we don't want to end 
the session if no commit/rollback succeeded.
+                            session.manualKill(true);

Review Comment:
   Thanks for pointing this out. I thought this case would have been covered by 
`onError` but it actually only runs if its transaction-managed. Addressed this 
by adding an extra check for `shouldManageTransactionsForRequest`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to