-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
Affects Version/s: 3.0.1
-
Component/s: Core
-
Environment:Windows 10 64bit.
Node v8.9.4
-
Empty show more show less
Problem:
bulk's final batch size is NOT sum of all document's bson-size, because batch query is an array, which add additional 4 bytes to each document.
Example from real use-case
According to unordered.js:188:
_self.s.currentBatch.sizeBytes == 16776523
According to commands.js:141:
var query = self.bson.serialize(this.query,
)
query.length == 16802161
Thus, batch fails