Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2514

Java client driver requests with same request ids hang

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.10
    • Fix Version/s: 3.5.0, 3.4.11
    • Component/s: driver
    • Labels:
      None

      Description

      Reproducer:

       

      // 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();
      
      

       

      I think the driver should reject the query when submitting the same request to prevent this from happening.

        Attachments

          Activity

            People

            • Assignee:
              spmallette Stephen Mallette
              Reporter:
              saikiranboga Saikiran Boga
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: