Pipelining an upload stream of GridFSBucket never finishes on Node v14

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.0.0, 3.6.6
    • Affects Version/s: 3.6.4
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Pipelining an upload stream you've created with GridFSBucket.
      openUploadStream worked on Node v12.20.1 and v10.23.0, but it never finishes on Node v14.16.0.
       

      async function test() {
          const mongoClient = await mongodb.MongoClient.connect('mongodb://localhost', {
              useUnifiedTopology: true
          });
          const mongoDb = mongoClient.db('test');
          const bucket = new mongodb.GridFSBucket(mongoDb, {
              bucketName: 'testBucket'
          });
      
          const fileStream = fs.createReadStream('test.js');
          const uploadStream = bucket.openUploadStream('test');
          await util.promisify(stream.pipeline)(fileStream, uploadStream);
      }
      

      You can find the whole test at https://github.com/snakamura/mongodb-fsbucket-pipeline.

              Assignee:
              Durran Jordan
              Reporter:
              Satoshi Nakamura
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: