[ 
https://issues.apache.org/jira/browse/TINKERPOP-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephen Mallette closed TINKERPOP-2514.
---------------------------------------
    Fix Version/s: 3.4.11
                   3.5.0
       Resolution: Fixed

> 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
>            Assignee: Stephen Mallette
>            Priority: Major
>             Fix For: 3.5.0, 3.4.11
>
>
> 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)

Reply via email to