You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Dylan Millikin (JIRA)" <ji...@apache.org> on 2015/10/08 15:15:26 UTC

[jira] [Created] (TINKERPOP3-875) transaction commit() issue

Dylan Millikin created TINKERPOP3-875:
-----------------------------------------

             Summary: transaction commit() issue
                 Key: TINKERPOP3-875
                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-875
             Project: TinkerPop 3
          Issue Type: Bug
          Components: server
            Reporter: Dylan Millikin
            Assignee: stephen mallette


I'm still experiencing issue with transactions (working my way from the titan bug). The following series of requests to gremlin server fail on the last {{tx().open()}} because of some issue with transaction management.
I've included all the information I have in the form of the log and the requests. They're all short enough to go through easily.

I'm also using a 3.0.2 snapshot the outdates the changes that were made to session management (as can be noticed by the last request with an {{op}} of {{close}})

{{GraphT}} and {{t}} refer to a neo4j graph and it's corresponding traversal.

Here's the full succession of requests (create two vertices in a transaction, fetch them and delete them in another transaction):
{code}
{"requestId":"5d1790dc-5ae0-4926-bc67-8736adbde576","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().open()","session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}

{"requestId":"bb0b6981-7d5e-4552-a964-f1b91b08bbe4","processor":"session","op":"eval","args":{"gremlin":"t.addV().property(B_KEY_NAME,B_KEYVALUE_NAME).property(B_KEY_AGE,B_KEYVALUE_AGE)","bindings":{"B_KEY_NAME":"name","B_KEYVALUE_NAME":"john","B_KEY_AGE":"age","B_KEYVALUE_AGE":27},"session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}

{"requestId":"37c133ab-195b-43d9-bb6a-c3b6e41e1396","processor":"session","op":"eval","args":{"gremlin":"t.addV().property(B_KEY_NAME,B_KEYVALUE_NAME).property(B_KEY_AGE,B_KEYVALUE_AGE)","bindings":{"B_KEY_NAME":"name","B_KEYVALUE_NAME":"john","B_KEY_AGE":"age","B_KEYVALUE_AGE":27},"session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}

{"requestId":"3cf7a392-4090-40a2-bb33-1b89e731cf03","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().commit()","session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}

{"requestId":"d641b90e-d746-4c44-87e4-226171a2bb44","processor":"","op":"eval","args":{"gremlin":"t.V(B_R_ID).range(0,1)","bindings":{"B_R_ID":168}}}

{"requestId":"b22267fb-49a3-4525-aa5c-938a9f7221cf","processor":"","op":"eval","args":{"gremlin":"t.V(B_R_ID).range(0,1)","bindings":{"B_R_ID":162}}}

// 5 second sleep

{"requestId":"67512bb9-14ab-42c4-9135-5e279a45fd11","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().open()","session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}

{"requestId":"55bbffa2-8bf2-4a2a-971a-c9b2efb9d183","processor":"session","op":"close","args":{"gremlin":"","session":"bc1c71e5-4122-4829-a349-0c9a8c0df5bd"}}
{code}

Here's the full server log from start to finish:
{code}
[INFO] Session - New session established for bc1c71e5-4122-4829-a349-0c9a8c0df5bd
[INFO] ScriptEngines - Loaded nashorn ScriptEngine
[INFO] ScriptEngines - Loaded gremlin-groovy ScriptEngine
[INFO] GremlinExecutor - Initialized gremlin-groovy ScriptEngine with scripts/gremlin-php-script.groovy
[WARN] AbstractEvalOpProcessor - Exception processing a script on request [RequestMessage{, requestId=67512bb9-14ab-42c4-9135-5e279a45fd11, op='eval', processor='session', args={gremlin=graphT.tx().open(), session=bc1c71e5-4122-4829-a349-0c9a8c0df5bd}}].
java.lang.IllegalStateException: Stop the current transaction before opening another
	at org.apache.tinkerpop.gremlin.structure.Transaction$Exceptions.transactionAlreadyOpen(Transaction.java:139)
	at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:85)
	at org.apache.tinkerpop.gremlin.structure.Transaction$open.call(Unknown Source)
	at Script2.run(Script2.groovy:1)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:525)
	at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:365)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
	at org.apache.tinkerpop.gremlin.groovy.engine.ScriptEngines.eval(ScriptEngines.java:96)
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$7(GremlinExecutor.java:244)
	at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor$$Lambda$110/1114839633.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[INFO] Session - Rolling back open transactions on graphT before killing session: bc1c71e5-4122-4829-a349-0c9a8c0df5bd
[INFO] Session - Session bc1c71e5-4122-4829-a349-0c9a8c0df5bd closed
{code}

Any ideas where to start looking?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)