Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2936

Bulk inserting many documents causes BSONObjectTooLarge error unexpectedly

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The documentation describes the maximum number of documents in a single batch operation. This number does not seem to be accurate because a BSONObjectTooLarge error can be thrown when inserting many small documents. An insert command that writing 2861 documents that add up to 16MB in size to a replica set (v4.4, v5.0) causes a BSONObjectTooLarge error to be thrown. For different server versions and topologies, the exact number of documents that can be inserted varies but stays roughly around 2860.

        1. main.go
          3 kB
          Jian Guan

            Assignee:
            matt.dale@mongodb.com Matt Dale
            Reporter:
            jian.guan@mongodb.com Jian Guan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: