Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9741

Comment on: "manual/core/gridfs.txt"

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Environment:

      Even though the sharding section for GridFS mentions that the field_id is monotonically increasing and that it is not possible use a hashed shard key in this case, it does not provide a solution for sharding GridFS without creating a hotspot for new files. One option to solve this problem that we could mention here is that it is possible to use a custom file_id, which could for instance be a random string, like a UUID. This would allow new files to be distributed evenly across all shards.

            ravind.kumar Ravind Kumar (Inactive)
            kai.orend@mongodb.com Kai Orend
            0 Vote for this issue
            2 Start watching this issue

              7 years, 23 weeks, 3 days ago