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

Add GridFSBucketOptions.SuppressEnsureIndexes

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.4
    • Component/s: GridFS
    • Environment:
      All
    • Fully Compatible

      The GridFS Driver currently calls EnsureIndexes during UploadFromStream. This is normally highly convenient because it ensures that files/chunks tables are correctly set up, with zero admin setup required. However, there is one highly significant downside (plus one less important downside).

      Downside 1: if you have SHARDED files/chunks collections, then the EnsureIndexes routine will fail when ANY shard is unavailable (even if the write operation pertains to a shard that is perfectly fine). This is because the EnsureIndexes routine issues a "find" operation and that find operation gets broadcast to all shards - so if one shard is down, the find will fail and so the whole write will fail. In my case, users in London are unable to save to London data centre, because New York data centre is currently offline - bad!

      Downside 2: Running EnsureIndexes requires user to have find permission, list (and potentially create) indexes permission. In my use case, I do not want user to have find permission (they can write but cannot read).

            Assignee:
            adelin.mbidaowona@mongodb.com Adelin Mbida Owona
            Reporter:
            jg1 John Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: