Uploaded image for project: 'Node Driver'
  1. Node Driver
  2. NODE-1778

BulkWrite: Incorrect batch-size calculations causes batch to fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: Not Applicable
    • Fix Version/s: 3.1.11, 3.2.0
    • Component/s: None
    • Labels:

      Description

      related to: https://jira.mongodb.org/browse/NODE-1298

      driver's calculation result is 16777058

      mongodb's calculation result is 16908004 which is greater than 16777058.

      It can be reproduced with mongodb3.6.

      sizeBytes 16776224
      bsonSize 832
      sizeBytes 16777058
      bsonSize 834
      [POST] (12-05 17:32:44) /_/admin/app/5c04edf9217a452865e5a8c3/excel/import 400 ::1 24738.093 ms
      [WARNING] BSONObj size: 16908004 (0x101FEE4) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "datas"
      time: Wed Dec 05 2018 17:32:44 GMT+0800 (China Standard Time)
      detail: MongoError: BSONObj size: 16908004 (0x101FEE4) is invalid. Size must be between 0 and 16793600(16MB) First element: insert: "datas"
          at /Users/zhangmengzhi/fanruan/fx-code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:580:63
          at authenticateStragglers (/Users/zhangmengzhi/fanruan/fx-code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:503:16)
          at Connection.messageHandler (/Users/zhangmengzhi/fanruan/fx-code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:539:5)
          at emitMessageHandler (/Users/zhangmengzhi/fanruan/fx-code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:309:10)
          at Socket.<anonymous> (/Users/zhangmengzhi/fanruan/fx-code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:452:17)
          at Socket.emit (events.js:182:13)
          at addChunk (_stream_readable.js:283:12)
          at readableAddChunk (_stream_readable.js:264:11)
          at Socket.Readable.push (_stream_readable.js:219:10)
          at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: