[
https://issues.apache.org/jira/browse/TINKERPOP3-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14974186#comment-14974186
]
ASF GitHub Bot commented on TINKERPOP3-910:
-------------------------------------------
GitHub user spmallette opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/122
TINKERPOP3-910 - In session transaction opened from sessionless request
https://issues.apache.org/jira/browse/TINKERPOP3-910
Test via:
```text
mvn clean install -DincludeNeo4j
mvn clean -DskipIntegrationTests=false -DincludeNeo4j --projects
gremlin-server verify
```
The summary for this change is in the comments of this commit:
https://github.com/apache/incubator-tinkerpop/commit/43f64c2a4aad965343ef87ce5407cb0b79d96714
VOTE: +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP3-910
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/122.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #122
----
commit 43f64c2a4aad965343ef87ce5407cb0b79d96714
Author: Stephen Mallette <[email protected]>
Date: 2015-10-23T20:36:37Z
TINKERPOP3-910 Clears the session channel attribute between requests.
If this value (and any other channel attribute) isn't cleared it will hang
around until the next request as they are global to the channel. In this case,
a first "in-session" request would succeed and put the channel in "session"
mode. A future sessionless request would arrive and execute its serialization
process in the sessions threads as the channel still had the session state from
the previous request. This likely would have been easier to debug if the the
onReadWrite stuff had been ThreadLocal as the in-session requests would have
been in MANUAL mode and the sessionless request would have yielded a more clear
error that the transaction was closed. Instead, because it was AUTO the
sessionless request auto-opened the tx.
The tests for this are in the link referenced above. We'll need to merge
those tests into this branch at some point to get this all to work together.
commit 0b573712c58c3f115a19b4c7542add3d7bbeb8fe
Author: Dylan Millikin <[email protected]>
Date: 2015-10-26T10:18:50Z
added tests around single channel in session and sessionless requests
----
> In session transaction opened from sessionless request
> ------------------------------------------------------
>
> Key: TINKERPOP3-910
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-910
> Project: TinkerPop 3
> Issue Type: Bug
> Components: server
> Affects Versions: 3.0.2-incubating
> Reporter: Dylan Millikin
> Assignee: Dylan Millikin
> Fix For: 3.1.0-incubating
>
>
> When running a series of in session and sessionless request from *the same*
> client, an in session transaction can be opened by a sessionless request.
> This failing test (in GremlinServerIntegrateTest.java) demonstrated this:
> https://github.com/PommeVerte/incubator-tinkerpop/commit/f8d4e618a74821f72dc1e3c107cd3b30d34917f2
> If these same requests are made from two different clients there are no
> issues (see test in GremlinDriverIntegrateTest.java)
> Rundown of what the tests do :
> - Open a transaction (in session)
> - Add vertex (in session)
> - Commit transaction (in session)
> - Test if transaction is closed (in session) {{=TRUE}}
> - Send sessionless read request.
> - Test if transaction is closed(in session) {{=FALSE}} <--- bug should be
> {{=TRUE}}
> The bug only occurs if there's a sessionless read, and if the read returns
> elements (not {{FastNoSuchElement...}}).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)