Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
3.6.1
-
None
-
None
-
Windows 10, Python 3.10.6
Description
Hi,
we've noticed that graph_traversal.py's V() does not take IDs larger or equal to 2^31 from version 3.6.1 on. It still worked on version 3.6.0.
The following code replicates the issue:
g = traversal().withRemote(connection) print(f"2147483647: {g.V(2147483647).hasNext()}") print(f"2147483648: {g.V(2147483648).hasNext()}")
On version 3.6.0 it produces the following output:
2147483647: False 2147483648: True
Note: The first ID does not exist in our graph, the latter does.
On version 3.6.1, it crashes and the following output is created:
2147483647: False Traceback (most recent call last): File "C:\tmp\struct-error-test.py", line 35, in <module> print(f"2147483648: {g.V(2147483648).hasNext()}") File "C:\tmp\venv\lib\site-packages\gremlin_python\process\traversal.py", line 105, in hasNext return self.has_next() File "C:\tmp\venv\lib\site-packages\gremlin_python\process\traversal.py", line 109, in has_next self.traversal_strategies.apply_strategies(self) File "C:\tmp\venv\lib\site-packages\gremlin_python\process\traversal.py", line 682, in apply_strategies traversal_strategy.apply(traversal) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\remote_connection.py", line 78, in apply remote_traversal = self.remote_connection.submit(traversal.bytecode) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\driver_remote_connection.py", line 102, in submit result_set = self._client.submit(bytecode, request_options=self._extract_request_options(bytecode)) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\client.py", line 149, in submit return self.submit_async(message, bindings=bindings, request_options=request_options).result() File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 458, in result return self.__get_result() File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result raise self._exception File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\connection.py", line 66, in cb f.result() File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 451, in result return self.__get_result() File "C:\Program Files\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result raise self._exception File "C:\Program Files\Python310\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\protocol.py", line 86, in write message = self._message_serializer.serialize_message(request_id, request_message) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\serializer.py", line 225, in serialize_message args = processor_obj.get_op_args(op, args) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\serializer.py", line 48, in get_op_args return op_method(args) File "C:\tmp\venv\lib\site-packages\gremlin_python\driver\serializer.py", line 88, in bytecode args['gremlin'] = self._writer.to_dict(gremlin) File "C:\tmp\venv\lib\site-packages\gremlin_python\structure\io\graphbinaryV1.py", line 168, in to_dict return self.serializers[t].dictify(obj, self, to_extend) File "C:\tmp\venv\lib\site-packages\gremlin_python\structure\io\graphbinaryV1.py", line 811, in dictify writer.to_dict(arg, to_extend) File "C:\tmp\venv\lib\site-packages\gremlin_python\structure\io\graphbinaryV1.py", line 168, in to_dict return self.serializers[t].dictify(obj, self, to_extend) File "C:\tmp\venv\lib\site-packages\gremlin_python\structure\io\graphbinaryV1.py", line 253, in dictify to_extend.extend(cls.byte_format_pack(obj)) struct.error: argument out of rangeProcess finished with exit code 1