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

mongo-rust-driver - PR #1003: fix: list_collections fails with MongoDB Atlas database with time-series collection

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None

      hallettj has created PR #1003: fix: list_collections fails with MongoDB Atlas database with time-series collection in mongo-rust-driver

      Issue Text:
      When creating a time-series collection on MongoDB Atlas the `clusteredIndex` field of the collection options is given as `true` instead of as an object that deserializes to `ClusteredIndex`. The rust driver does not expect a boolean in that position, so parsing `CreateCollectionOptions` fails. This causes methods such as `db.list_collections()` to fail.

      This change adds a custom deserializer that handles the case where `clusteredIndex: true` by filling in the default value for `ClusteredIndex`.

      I don't know if `clusteredIndex: false` is a valid state so in the interest of being conservative I have made that an error case in the custom deserializer.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: