Skip to content

Conversation

@tahajahangir
Copy link
Contributor

Request id should be in range [-2^31, 2^31 - 1] not [-2^31 - 1, 2^31]

This is the traceback:

....
  File "lib/python2.7/site-packages/mongotor/cursor.py", line 77, in find
    self._skip, self._limit, self._query_spec(), self._fields)
  File "lib/python2.7/site-packages/mongotor/message.py", line 105, in query
    return __pack_message(2004, data)
  File "lib/python2.7/site-packages/mongotor/message.py", line 49, in __pack_message
    message += struct.pack("<i", request_id)
error: 'i' format requires -2147483648 <= number <= 2147483647

The probability of giving out-of-range number in current code is 0.00000000047 but this happened!

@tahajahangir tahajahangir force-pushed the patch-1 branch 3 times, most recently from 4d51524 to bd610c5 Compare December 2, 2014 08:22
Should be [-2^31, 2^31 - 1] not [-2^31 - 1, 2^31]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant