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

The index ensured by mongoc_client_get_gridfs must be unique

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: GridFS
    • None

      mongoc_client_get_gridfs() returns NULL in MongoDB versions < 3.0.

      Error message is:
      files_id_1_n_1 already exists with different options

      When uploading files (e.g. using mongofiles), MongoDB creates an index with

      {unique:1}

      in MongoDB 3.0, while it is missing in lower versions.

      What is the value of ensuring this index on each access anyway? MongoDB certainly creates the index. This is also a side-effect that should be documented.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            msoutier Marius Soutier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: