Problems reading small file with GridFSBucket API

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: GridFS
    • Environment:
      Running on Linux 64bit KDE neon User Edition 5.9 (Ubuntu Xenial Based)
      npm-mongo@2.2.24
    • Not Needed
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Using the code below is working fine with files having a size greater than the chunksize, however trying to read a 30056 Bytes file with a bucket defined with a default chunksize of 261120 Bytes, it takes a long time (about a whole minute) before returning the content, where bigger files are returned instantly.

      const mongo = Package.mongo.MongoInternals.NpmModule;
      const db = Package.mongo.MongoInternals.defaultRemoteCollectionDriver().mongo.db;
      const mongoStore = new mongo.GridFSBucket(db, {
        bucketName: "fs",
        chunkSizeBytes: 1024 * 255
      });
      const readStream = mongoStore.openDownloadStream("123456", {
        start: 0,
        end: 30055
      });
      return writeStream;
      

              Assignee:
              Unassigned
              Reporter:
              Karl Stein
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: