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

Improve error reporting for serialization errors between gremlin-python and gremlin-server

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.2.6
    • 3.2.7, 3.3.1
    • python, server
    • None

    Description

      We ran into an issue while attempting to add a PartitionStrategy to our traversals. This is a small example of a traversal I tried:

      remote = DriverRemoteConnection('ws://localhost:8182/gremlin', 'DSE_GRAPH_QUICKSTART.g')
      strategy = PartitionStrategy('community_id', '2097442560', 2097442560)
      g = Graph().traversal().withRemote(remote).withStrategies(strategy)
      print(g.V().toList())
      

      The third argument of PartitionStrategy should be a list. However, the traversal strategies in gremlin-python do not do any kind of argument/type checking, and any mistake you make results in the following error from gremlin server:

      ERROR [gremlin-server-worker-1] 2017-10-25 10:15:53,285 GREMLIN TraversalOpProcessor.java:365 - Could not deserialize the Traversal instance
      

      I've omitted the full traceback for brevity. There is not much indication as to what has gone wrong. gremlin-python gives this error:

      gremlin_python.driver.protocol.GremlinServerError: 599: None
      

      Which is also unhelpful. We were eventually able to figure out what we were doing wrong, but it would be very nice to have either some input validation on the gremlin-python side, or have gremlin-server be more specific about the nature of the deserialisation error (or both).

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              hugoarts Hugo Arts
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: