Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4296

mongoc_gridfs_file_set_id() does not work when the file has many chunks.

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.21.0
    • Component/s: GridFS

      Summary

      mongoc_gridfs_file_set_id() does not work when the file has many chunks.

      Environment

      version: mongo-c-driver-1.21.0

      host: debian 11 64-bit x86

      gcc: gcc (Debian 10.2.1-6) 10.2.1 20210110

       

      How to Reproduce

      I use the example-gridfs tool to upload a big file, but the fs.files._id is not  as expected.

      Then I upload a samll file, fs.files._id is as expected.

      test> db.fs.files.find({})
      [

      { _id: ObjectId("620cd61f9f63db1b8d012941"), chunkSize: 261120, filename: 'ss', length: Long("429273416"), uploadDate: ISODate("2022-02-16T10:46:55.642Z") }

      ,

      { _id: 1, chunkSize: 261120, filename: 'aa', length: Long("170027"), uploadDate: ISODate("2022-02-16T10:58:44.562Z") }

      ]

       

            Assignee:
            jesse.williamson@mongodb.com Jesse Williamson (Inactive)
            Reporter:
            wanglong.kevin@gmail.com kevin wanglong_
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: