[DOCS-9741] Comment on: "manual/core/gridfs.txt" Created: 09/Jan/17 Updated: 11/Sep/18 Resolved: 08/Nov/17 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Kai Orend | Assignee: | Ravind Kumar (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: https://docs.mongodb.com/manual/core/gridfs/ |
||
| Issue Links: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Days since reply: | 7 years, 5 weeks, 1 day ago | ||||||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Ravind Kumar (Inactive) [ 10/Jan/17 ] |
|
Hi kai.orend, From speaking to gabriel.russell, mongofiles does not support this. I've filed steve.renaker , lets use this ticket as a top-level to track how the driver documentation is coming along. We can convert to an epic to track each of them. If the driver documentation completes before Thanks for bringing this to our attention. |
| Comment by Kai Orend [ 09/Jan/17 ] |
|
Hi ravind.kumar The driver spec has been updated regarding this, see: https://jira.mongodb.org/browse/DRIVERS-299 The custom Id needs to be set during the insertion of the file, it cannot be changed afterwards. |
| Comment by Ravind Kumar (Inactive) [ 09/Jan/17 ] |
|
Hello kai.orend, Looking at the GridFS documentation, specifically mongofiles, I don't see a way for the user to change the file._id as a part of a put operation. Are we assuming the user would change the file._id after inserting the file? |