[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/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0
Referrer: https://www.google.de/
Screen Resolution: 1920 x 1200


Issue Links:
Documented
documents TOOLS-1591 mongofiles should support custom Grid... Closed
Duplicate
is duplicated by DOCS-10993 Improve Sharding GridFS information Closed
Related
related to DRIVERS-299 Custom GridFS files._id Closed
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 TOOLS-1591 in the meantime to track that change.

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 TOOLS-1591, I think a short-term solution would be to point users on the manual to the driver doc and recommend using an appropriate driver for interfacing with mongofiles in the sharding use case. Its not ideal, but if TOOLS-1591 requires significant time to complete, it might be the better choice.

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?

Generated at Thu Feb 08 07:59:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.