[
https://issues.apache.org/jira/browse/TINKERPOP-1106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139268#comment-15139268
]
ASF GitHub Bot commented on TINKERPOP-1106:
-------------------------------------------
GitHub user spmallette opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/218
TINKERPOP-1106 Better handled commit and serialization errors in Gremlin
Server.
https://issues.apache.org/jira/browse/TINKERPOP-1106
Both types of errors were causing problems. For commit errors, the last
message from iteration was already sent back to the client as a terminating
message so failure on commit after that was ignored by the driver because it
had already received the terminator for that request. Serialization errors
didn't break the result iteration loop - they were being handled, but the
result iteration was allowed to continue. I'm not so sure that those types of
failures weren't leaking transactions either - that should be fixed now too.
This stuff is hard to write tests for with Gremlin Server as I dont' know
how to force raise a commit exception for Neo4j. I was able to test externally
with graphs that were easier to force that condition.
Tested with: `mvn clean install && mvn verify -pl gremlin-server
-DskipIntegrationTests=false`
VOTE: +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1106
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/218.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 #218
----
commit 9f85d3ed73e41313fc5f7981a1899ed0f8482fa6
Author: Stephen Mallette <[email protected]>
Date: 2016-02-03T20:28:25Z
Better handled commit and serialization errors in Gremlin Server.
Both types of errors were causing problems. For commit errors, the last
message from iteration was already sent back to the client as a terminating
message so failure on commit after that was ignored by the driver because it
had already received the terminator for that request. Serialization errors
didn't break the result iteration loop - they were being handled, but the
result iteration was allowed to continue. I'm not so sure that those types of
failures weren't leaking transactions either - that should be fixed now too.
This stuff is hard to write tests for with Gremlin Server as I dont' know
how to force raise a commit exception for Neo4j. I was able to test externally
with graphs that were easier to force that condition.
----
> Errors on commit in Gremlin Server don't register as exception on driver
> ------------------------------------------------------------------------
>
> Key: TINKERPOP-1106
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1106
> Project: TinkerPop
> Issue Type: Bug
> Components: server
> Affects Versions: 3.1.1-incubating
> Reporter: stephen mallette
> Assignee: stephen mallette
> Priority: Critical
> Fix For: 3.1.2-incubating
>
>
> Because the last message in a result is sent before commit as the terminating
> message, a failure on {{commit()}} will send another message, but the driver
> won't be looking for it and it will not register as an exception on that
> request.
> Seems like the solution would be to save the last message until after commit,
> and if the commit fails, you would send the error back otherwise send the
> last message. In this way the protocol doesn't have to change.
> Also need to determine if exceptions prevent additional iteration of results
> back to the client as discussed here:
> https://groups.google.com/d/msg/gremlin-users/H5IlmZ4Zgyc/ENfScPisCgAJ
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)