Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1385

_first_batch responses are not upconverted for command monitoring

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6
    • Affects Version/s: None
    • Component/s: Monitoring
    • None
    • Minor Change

      According to the command monitoring spec:

      All legacy operations MUST be converted to their equivalent commands in the 3.2 server in the event's command and reply fields. This includes OP_INSERT, OP_DELETE, OP_UPDATE, OP_QUERY, OP_GET_MORE and OP_KILL_CURSORS.

      https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst#upconversion

      However, pymongo.helpers._first_batch publishes a command event in the internal format returned from pymongo.helpers._unpack_response:

      {
              'cursor_id': <long>,
              'starting_from': <int>,
              'number_returned': <int>,
              'data': [OP_QUERY documents...] ,
      }
      

      This affects pymongo's helpers for listIndexes, listCollections, currentOp, and fsyncUnlock.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: