-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 2.1.4
-
Component/s: MongoDB 3.2
-
Environment:OSX 10.11.2 and Windows 7, node 4.2.x, mongodb 3.2/3.0.x
-
Empty show more show less
Mongo driver do not seem to free used buffers while/after upload a file.
I tried with >2GB files y seems to keep double the file size memory.
I use the following code for my tests:
"use strict"; const mongodb = require("mongodb"), GridFSBucket = mongodb.GridFSBucket, MongoClient = mongodb.MongoClient, fs = require("fs"); MongoClient.connect("mongodb://localhost:27017/test").then(function (db) { const bucket = new GridFSBucket(db), readStream = fs.createReadStream("./bigfile.dat"), uploadStream = bucket.openUploadStream("bigfile.dat"), uploadStream.once("finish", function () { console.log(uploadStream.id); }); readStream.pipe(uploadStream); });
I do not close db to keep the process open.
is it something wrong with the test?
Regards,