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

[Java][gremlin-driver] Query to a remote server via the websocket client hangs indefinitely if the server becomes unavailable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2, 3.3.3
    • 3.4.0, 3.3.4, 3.2.10
    • driver
    • None

    Description

      Query to a remote server via the websocket client hangs indefinitely if the server becomes unavailable.

       

      Consider the code snippet below. 

       

       

      // Create a websocket client
      final Client client = Cluster.build().addContactPoint(<endpoint>).create().connect();
      // submit a query
      ResultSet resultSet = client.submit("g.V().id()");
      // wait for all the results
      resultSet.all().join();
       
      

       

      If the

      client.submit(...)

      call succeeds (that is the server is available/reachable) but before getting the results from the server, the server becomes unavailable/unreachable, then the client code hangs indefinitely at 

      resultSet.all().join()

      .

      The right behavior would be to throw an exception indicating the server is not available anymore. The hanging behavior suggests that the channelInactive call from websocket connection may not be getting propagated properly (perhaps getting swallowed somewhere).

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            ankesh Ankesh Khandelwal
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: