[ 
https://issues.apache.org/jira/browse/TINKERPOP-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15060078#comment-15060078
 ] 

ASF GitHub Bot commented on TINKERPOP-1045:
-------------------------------------------

GitHub user spmallette opened a pull request:

    https://github.com/apache/incubator-tinkerpop/pull/180

    TINKERPOP-1045 Validate bindings on the server to ensure that they were 
String keys

    https://issues.apache.org/jira/browse/TINKERPOP-1045.
    
    Also, fixed a problem where error messages were not always propagating back 
to the client (usually around validation).  They were being sent back in the 
result field rather than in the statusMessage field.
    
    Tested with: 
    
    ```text
    mvn clean install && mvn verify -DskipIntegrationTests=false -pl 
gremlin-server
    ```
    and did manual testing as well with the console - see the JIRA ticket for 
console output.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1045

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-tinkerpop/pull/180.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 #180
    
----
commit 55752d30e48d4ace8e7375e4dd46ff0e633bb828
Author: Stephen Mallette <[email protected]>
Date:   2015-12-16T14:47:02Z

    Validate bindings on the server to ensure that they were String keys.
    
    Also, fixed a problem where error messages were not always propagating back 
to the client (usually around validation).  They were being sent back in the 
result field rather than in the statusMessage field.

----


> Client-Side Hangs when attempting to access a HashMap with Keys of type 
> Integer
> -------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1045
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1045
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.1.0-incubating
>            Reporter: Shaunak Das
>            Assignee: stephen mallette
>            Priority: Minor
>             Fix For: 3.1.1-incubating
>
>
> I try to use a HashMap that has keys of type Integer, and send the following 
> request: 
> {code}
> gremlin> map = [1: "hello", 2: 3]
> ==>1=hello
> ==>2=3
> gremlin> map[1]
> ==>hello
> gremlin> map[2]
> ==>3
> gremlin> client = Cluster.build().create().connect().alias("graph.g")
> ==>org.apache.tinkerpop.gremlin.driver.Client$ReboundClusteredClient@cda4919
> gremlin> client.submit('1+1').all().get()
> ==>result{object=2 class=java.lang.Integer}
> gremlin> client.submit('map[1]', map).all().get()
> The client-side ends up hanging. The Gremlin Server logs give this, which is 
> to be expected, as explained to me by Stephen:
> WARN  [gremlin-server-worker-1] 2015-12-16 00:34:26,609  Slf4JLogger.java:151 
> - An exceptionCaught() event was fired, and it reached at the tail of the 
> pipeline. It usually means the last handler in the pipeline did not handle 
> the exception.
> io.netty.handler.codec.DecoderException: java.lang.ClassCastException: 
> java.lang.Integer cannot be cast to java.lang.String
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> com.datastax.bdp.graph.plugin.GremlinServerGraphHandler.handleRequestMessage(GremlinServerGraphHandler.java:94)
>  [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> com.datastax.bdp.graph.plugin.AbstractRequestMessageHandler.channelRead(AbstractRequestMessageHandler.java:62)
>  [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> com.datastax.bdp.cassandra.audit.GremlinServerAuditLogRequestHandler.handleRequestMessage(GremlinServerAuditLogRequestHandler.java:32)
>  [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> com.datastax.bdp.graph.plugin.AbstractRequestMessageHandler.channelRead(AbstractRequestMessageHandler.java:62)
>  [dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler$1.channelRead(WebSocketServerProtocolHandler.java:147)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:848)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) 
> [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) 
> [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) 
> [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.String
>       at 
> org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor$$Lambda$451/1156928780.test(Unknown
>  Source) ~[na:na]
>       at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) 
> ~[na:1.8.0_40]
>       at 
> java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
>  ~[na:1.8.0_40]
>       at 
> java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:529)
>  ~[na:1.8.0_40]
>       at 
> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:516) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
> ~[na:1.8.0_40]
>       at 
> java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:449) 
> ~[na:1.8.0_40]
>       at 
> org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.validateEvalMessage(AbstractEvalOpProcessor.java:137)
>  
> ~[gremlin-server-3.1.1-SNAPSHOT-20151209-e1624745.jar:3.1.1-SNAPSHOT-20151209-e1624745]
>       at 
> org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.select(AbstractEvalOpProcessor.java:114)
>  
> ~[gremlin-server-3.1.1-SNAPSHOT-20151209-e1624745.jar:3.1.1-SNAPSHOT-20151209-e1624745]
>       at 
> com.datastax.bdp.graph.plugin.DseOpSelectorHandler.decode(DseOpSelectorHandler.java:83)
>  ~[dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> com.datastax.bdp.graph.plugin.DseOpSelectorHandler.decode(DseOpSelectorHandler.java:42)
>  ~[dse-graph-5.0.0-DSP-5175.jar:5.0.0-DSP-5175]
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
>  [netty-all-4.0.33.dse.jar:4.0.33.dse]
>       ... 37 common frames omitted
> {code}
> Any way to stop the hang on the client-side?



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

Reply via email to