Commit 82aa4b2b authored by Yuxin Wu's avatar Yuxin Wu

Use larger length threshold in msgpack for all types (fix #1003)

parent 395a5add
...@@ -8,6 +8,8 @@ from . import logger ...@@ -8,6 +8,8 @@ from . import logger
__all__ = ['loads', 'dumps'] __all__ = ['loads', 'dumps']
MAX_MSGPACK_LEN = 1000000000
def dumps_msgpack(obj): def dumps_msgpack(obj):
""" """
...@@ -26,7 +28,11 @@ def loads_msgpack(buf): ...@@ -26,7 +28,11 @@ def loads_msgpack(buf):
""" """
# Since 0.6, the default max size was set to 1MB. # Since 0.6, the default max size was set to 1MB.
# We change it to approximately 1G. # We change it to approximately 1G.
return msgpack.loads(buf, raw=False, max_bin_len=1000000000) return msgpack.loads(buf, raw=False,
max_bin_len=MAX_MSGPACK_LEN,
max_array_len=MAX_MSGPACK_LEN,
max_map_len=MAX_MSGPACK_LEN,
max_str_len=MAX_MSGPACK_LEN)
def dumps_pyarrow(obj): def dumps_pyarrow(obj):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment