Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1743

gridfs chunk values serialized to wrong type

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      FilesCollectionDocument.chunk_size_bytes and Chunk.n are both represented in Rust as u32, which makes sense abstractly as neither can be negative. However, this means they're serialized as bson int64 (bson has no unsigned types), which doesn't match the spec which says they should both be int32. Concretely, this means that writing gridfs files with the Rust driver means they can't be read with other drivers, as in https://github.com/mongodb/mongo-rust-driver/issues/938.

            Assignee:
            abraham.egnor@mongodb.com Abraham Egnor
            Reporter:
            abraham.egnor@mongodb.com Abraham Egnor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: