Skip to content

MongoDB can only handle up to 8-byte ints #258

Open
@SaidBySolo

Description

Please explain the bug.

MongoDB can only handle up to 8-byte ints

Related #230

How can I reproduce it?

GET http://api.saebasol.org/api/hitomi/list/1000000000000000000000000000000000000000000

Logs/tracebacks

OverflowError: MongoDB can only handle up to 8-byte ints
  File "handle_request", line 83, in handle_request
    from sanic.models.handler_types import ListenerType, MiddlewareType
  File "heliotrope/rest/api/hitomi/info.py", line 43, in get
    info = await request.app.ctx.odm.get_info(id)
  File "heliotrope/database/odm/__init__.py", line 46, in get_info
    await self.collection.find_one({"id": id}, {"_id": 0}),
  File "concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "pymongo/collection.py", line 1452, in find_one
    for result in cursor.limit(-1):
  File "pymongo/cursor.py", line 1248, in next
    if len(self.__data) or self._refresh():
  File "pymongo/cursor.py", line 1165, in _refresh
    self.__send_message(q)
  File "pymongo/cursor.py", line 1052, in __send_message
    response = client._run_operation(
  File "pymongo/_csot.py", line 105, in csot_wrapper
    return func(self, *args, **kwargs)
  File "pymongo/mongo_client.py", line 1302, in _run_operation
    return self._retryable_read(
  File "pymongo/_csot.py", line 105, in csot_wrapper
    return func(self, *args, **kwargs)
  File "pymongo/mongo_client.py", line 1420, in _retryable_read
    return func(session, server, sock_info, read_pref)
  File "pymongo/mongo_client.py", line 1298, in _cmd
    return server.run_operation(
  File "pymongo/server.py", line 100, in run_operation
    message = operation.get_message(read_preference, sock_info, use_cmd)
  File "pymongo/message.py", line 383, in get_message
    request_id, msg, size, _ = _op_msg(
  File "pymongo/message.py", line 687, in _op_msg
    return _op_msg_uncompressed(flags, command, identifier, docs, opts)

Heliotrope version or Docker image version

6.2.7

Python Version

No response

OS

No response

Additional Description

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    ODMbugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions