-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.4.0, 2.4.4
-
Component/s: Sharding
-
Environment:Sharded gridfs.
-
Sharding EMEA
-
(copied to CRM)
I have created a sharded cluster for use with GridFS.
I would like to use a hashed shard key for the chunks to ensure the data is uniformly distributed across the cluster. When I try to use the filemd5 command to validate the files I receive an error saying the collection has to be indexed on the {{
{files_id:1}or
{files_id:1, n:1}}}.
mongos> db.gridfs.chunks.runCommand( { filemd5 : ObjectId("51b535788544eb45b4cdaab5"), root : 'gridfs' } ) { "ok" : 0, "errmsg" : "GridFS fs.chunks collection must be sharded on either {files_id:1} or {files_id:1, n:1}" }
I think the set of acceptable indexes should be updated to include the hashed type.
The stats() for the chunks collection is attached.
- is duplicated by
-
SERVER-19789 filemd5 command does not jive with hashed shard keys
- Closed
- links to