[SERVER-889] sharding by "_id" dosen't work for gridfs chunks Created: 21/Oct/09 Updated: 12/Jul/16 Resolved: 29/Oct/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tomasz Drobiszewski | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
On two servers Linux scorpius 2.6.28-15-server #52-Ubuntu SMP Wed Sep 9 11:50:50 UTC 2009 i686 GNU/Linux |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Initialization: ); { "ok" : 1, "added" : "andro3:2048" }> db.runCommand( { addshard : "scorpius:2048" }); { "ok" : 1, "added" : "scorpius:2048" }> admin = db.getSisterDB( "test" ); ) { "ok" : 1 }> db } ) { "collectionsharded" : "test.fs.chunks", "ok" : 1 }$./test_load_file.py Dexter.S04E03.HDTV.XviD-SYS.avi max: { _id: MaxKey }before: { _id: ObjId(4adf0a2b581c741d1b0dcb4c) }shard ns:test.fs.chunks shard: scorpius:2048 min: { _id: MinKey }max: { _id: MaxKey }after : { _id: ObjId(4adf0a2b581c741d1b0dcb4c) }shard ns:test.fs.chunks shard: scorpius:2048 min: { _id: MinKey }max: { _id: MaxKey }Wed Oct 21 15:19:27 connection accepted from 127.0.0.1:43752 #2 > db.fs.chunks.find() Replace db.runCommand( { shardcollection : "test.fs.chunks", key : { _id : 1 }} ) to db.runCommand( { shardcollection : "test.fs.chunks", key : { n : 1 }} ) everything going to work. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 16/Dec/10 ] |
|
NOTE: currently it has to be sharded { files_id } |
| Comment by Eliot Horowitz (Inactive) [ 29/Oct/09 ] |
|
fixed some of the underlying issues, but... the root problem is that there are operationson gridfs that don't many sense when you shard by _id chunks need to be sharded on { files_id , n }since that's what it looks up chunks by, not _id |