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

Bad error message when bulk insert is given a very large document

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      We generate a very large (>16MB) document, and try to insert it via a bulk operation:

      bulk = collection.initialize_unordered_bulk_op
      bulk.insert({ large doc })
      bulk.execute
      

      We expect the error message to be similar to the message when a regular insert() is passed too large a document:

      BSON::InvalidDocument: Document is too large (17825822). This BSON document is limited to 4194304 bytes.
      

      Instead, this is the error returned:

      NoMethodError: undefined method `[]' for nil:NilClass
      

            Assignee:
            gjmurakami Gary Murakami
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: