GridFS C# driver Unique Index error with sharding

XMLWordPrintableJSON

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

      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 }

        1. GridFS Error.PNG
          5 kB
          Hari Dosapati

            Assignee:
            Unassigned
            Reporter:
            Hari Dosapati
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: