2

Disclaimer: We are currently using gremlinpython==3.4.8 and I believe some of this has been addressed in the more recent releases but I'm not sure. In general this seems like a very active repository with some relevant changes in the past two latest release logs (currently on 3.4.10). Happy to upgrade as needed.

Where is the documentation, or can you provide an example of instantiating a DriverRemoteConnection object that has the appropriate configuration to allow for retrying each query submission with NUM_RETRIES number of retries?

I am not sure which of these options applies in order to get the kind of behavior I want. https://tinkerpop.apache.org/docs/current/reference/#python-configuration

Maybe what makes sense is to override the submit method

Examples of how we currently instantiate DriverRemoteConnection object:

  •   gremlin_python.process.anonymous_traversal import traversal
      connection_object = traversal().withRemote(CONNECTION_STRING)
    
user3659451
  • 1,913
  • 9
  • 30
  • 43

1 Answers1

1

Where is the documentation, or can you provide an example of instantiating a DriverRemoteConnection object that has the appropriate configuration to allow for retrying each query submission with NUM_RETRIES number of retries?

There is no such configuration. Even for the Java driver, which is the most featured driver in the TinkerPop repository, there is no such feature. Request retries require application specific programming as server error messages and codes are not currently unified (see TINKERPOP-2517). Therefore, depending on the graph database you have chosen you would need to determine what error codes and/or messages you would retry on and code such application logic yourself. Hopefully that clarifies TinkerPop's position and the features of the drivers.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • Thank you for this reply and for making a ticket. The way we have dealt with it is that we have created our own DriverRemoteConnection class but I don't think that should be a best practice which was the motivation for this ticket. It seems to work OK with 3.4.8. – user3659451 Feb 03 '21 at 18:30
  • https://aiogremlin.readthedocs.io/en/latest/index.html – Nizam Mohamed Feb 09 '21 at 16:32