Audit GridFS implementation for correct handling of user-provided and server-provided file lengths and chunk sizes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.2.0-rc0
    • Affects Version/s: None
    • Component/s: Implementation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      From the GridFS spec:

      However, drivers MUST be able to handle existing GridFS files where the length and chunkSize fields might have been stored using a different numeric data type.

      It appears that the initial GridFS implementation does not correctly handle downloads of files where the "chunkSize" element from the files document is stored as a 64-bit integer.

      In addition, the GridFS API should document that users may not specify a chunk size larger than the maximum value for int32_t when uploading files. Currently, the user-provided chunk size value is narrowed to int32_t in the mongocxx::uploader constructor (when sizeof(size_t) is greater than 4 on the user's system). We should audit the rest of the logic surrounding the handling of these values.

              Assignee:
              Samuel Rossi (Inactive)
              Reporter:
              J Rassi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: