|
Current GridFS spec conflicts with our main documentation for GridFS where we suggest that files._id can be set when saving a file.
The default files_id value is an ObjectId, as a result, the values of files_id are always ascending, and applications will insert all new GridFS data to a single chunk and shard. If your write load is too high for a single server to handle, consider a different shard key or use a different value for _id in the files collection.
https://docs.mongodb.org/manual/tutorial/shard-gridfs-data/
_id: a unique ID for this document, of type BSON ObjectId. Legacy GridFS systems may store this value as a different type. New files must be stored using an ObjectId.
https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst
|