Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1980

Ensure cursor IDs are always encoded as 64-bit integers in BSON for getMore

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.11.0, 2.10.3
    • Affects Version/s: None
    • Component/s: Spec Comp
    • None
    • Fully Compatible

      will.shulman shared a sporadic exception on getMore commands issued by the Ruby driver in the #ruby Slack channel earlier today:

      2019-10-22T08:30:59.786-0700 I ACCESS   [conn145582] TypeMismatch: Field 'getMore' must be of type long in: { getMore: 2105132016...
      

      The cursor ID happened to be smaller than INT32_MAX and the driver encoded it as a 32-bit integer type instead of 64-bit, which triggered some strict validation error on the server side. The find/getMore/killCursors spec does state that those commands use 64-bit integers for cursor IDs, so this would appear to just be an instance of the Ruby driver not fully complying with that spec.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: