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

PartitionStrategy from Python causes a 599 GremlinServer error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 3.4.1
    • Fix Version/s: None
    • Component/s: python
    • Labels:
      None
    • Environment:
      Linux client, Python 3, pip install of gremlinpython 3.4.1

      Description

      Using the code snippet below to any GremlinServer running even an empty TinkerGraph causes GremlinServer to fail with a 599 error. I assume as this is a decoration strategy that the client side Python is generating something invalid. I could not find any coverage for PartitionStrategy in the strategy test cases for the Python client. Maybe I missed them but did not find any. I opened this against 3.4.1 but I have not tried to use this strategy from Python before so not sure if it worked previously.

       

       

       
      from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
      from gremlin_python.structure.graph import Graph
      from gremlin_python import statics
      from gremlin_python.process.graph_traversal import __
      from gremlin_python.process.strategies import *
      from gremlin_python.process.traversal import *
      from gremlin_python.process.anonymous_traversal import traversal
      import sys
      
      endpoint = 'ws://localhost:8182/gremlin'
      graph=Graph()
      connection = DriverRemoteConnection(endpoint,'g')
      g = traversal().withRemote(connection)
      
      g2 = g.withStrategies(PartitionStrategy(partition_key="partition",write_partition="a", read_partitions="a"))
      try:
      x = g2.addV('test').property("p1",1).toList()
      except:
      print("Exception trying to add a vertex")
      print(sys.exc_info())
      finally:
      connection.close()

      When run the code above will generate this error:

       

      Exception trying to add a vertex
      (<class 'gremlin_python.driver.protocol.GremlinServerError'>, GremlinServerError('599: None',), <traceback object at 0x7f723781ff88>)
       connection.close()

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gfxman Kelvin R. Lawrence
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: