Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-896

GridFS C# driver Unique Index error with sharding

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • None
    • None
    • None
    • None

    Description

      When trying to insert a GridFS record into a shard collection and replicateset cluster env using the below code getting error as mentined in the image

      db.GridFS.Upload(mongoDocs.m_stream[docItem], mongoDocs.m_fileInfo[docItem].Name) 

      We haven't created any index on the fs.chunks collection.

      Error is :

      can't use unique indexes with sharding  
      ns:researchdocs.fs.chunks key: { files_id: 1, n: 1 }

      Attachments

        Activity

          People

            Unassigned Unassigned
            hari.dosapati@credit-suisse.com Hari Dosapati
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: