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

RawBatchCursor behaves strangely

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.7.2
    • Component/s: None
    • None
    • Environment:
      With mongo server version 4.0.8

      I'm getting some weird behavior using the RawBatchCursor and I'm not sure if its normal or not. For instance if I run an aggregate_raw_batches and expect to get 10,000 documents back and run `list(my_cursor.batch_size(1))` I get a list of 5,000 elements with each element being 2 documents concatenated together. Then if I insert this I get 5,000 documents inserted (first document from each pair) but I would expect 10,000.

      What I would like to do is be able to run `insert_many` on the resulting RawBatchCursor of an aggregate_raw_batches and have it upload all docs instead of the first one in a concatenated string of bytes without any decoding. Could you advise on the best way to accomplish this?

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            kboehme Kevin Boehme
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: