You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/18 20:08:00 UTC

[jira] [Commented] (TINKERPOP-2514) Java client driver requests with same request ids hang

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

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

spmallette opened a new pull request #1391:
URL: https://github.com/apache/tinkerpop/pull/1391


   https://issues.apache.org/jira/browse/TINKERPOP-2514
   
   The driver throws an error if the same request id is already pending in the queue which is the solution suggested on the ticket. I think that largely solves this specific problem. I suppose there might be ways to still to trick out the server but I wonder if we need to try to account for that as this doesn't seem like a normal operating condition. Perhaps this is a good enough fix.
   
   All tests pass with `mvn clean install && mvn verify -pl gremlin-server -DskipIntegrationTests=false`
   
   VOTE +1


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Java client driver requests with same request ids hang
> ------------------------------------------------------
>
>                 Key: TINKERPOP-2514
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2514
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: driver
>    Affects Versions: 3.4.10
>            Reporter: Saikiran Boga
>            Priority: Major
>
> Reproducer:
>  
> {code:java}
> // submit query1
> Future<?> query1_result = client.submitAsync(<query1 that takes 10s>, RequestOptions.build().overrideRequestId(UNIQUE_UUID_1).create());
> // Add buffer wait to ensure server gets time to start query1 and submit query2
> Thread.sleep(100);
> try {
>   ResultSet query2_resultSet = this.client.submit(<query2 that takes 2s>, RequestOptions.build().overrideRequestId(UNIQUE_UUID_1).create());
>   query2_resultSet.all().get();
> } catch(Exception ex) {
>  // ignore
> }
> // This never completes as the ResultSet tracked by driver at connection is 
> // overridden when we submit the second query with same request id.
> // The ResultSet of the first query is orphaned and not updated, leaving the get() // to wait forever.
> query1_result.get();
> {code}
>  
> I think the driver should reject the query when submitting the same request to prevent this from happening.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)