[JAVA-525] make it possible to override _id for GridFS file Created: 23/Feb/12 Updated: 18/Jun/12 Resolved: 18/Apr/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.8.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Antoine Girbal | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
This is needed for proper sharding support. Also it would allow to have a unique constraint on filename, if it's used as _id. |
| Comments |
| Comment by Jeffrey Yemin [ 18/Jun/12 ] |
|
Closing for 2.8.0 release. |
| Comment by Jeffrey Yemin [ 18/Apr/12 ] |
|
Added com.mongodb.gridfs.GridFSInputFile#setId method. |
| Comment by auto [ 18/Apr/12 ] |
|
Author: {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by auto [ 17/Apr/12 ] |
|
Author: {u'login': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}Message: |
| Comment by auto [ 17/Apr/12 ] |
|
Author: {u'login': u'dgottlieb', u'name': u'Daniel Gottlieb', u'email': u'daniel.gottlieb@10gen.com'}Message: |
| Comment by Mrityunjay Kant [ 17/Apr/12 ] |
|
Agreed, this is a required feature to prevent sharding hot spots; it's a cause of concern for us as we speculate on using GridFS as a file store. Also, can we create a bug for Casbah to include this change? |
| Comment by Scott Hernandez (Inactive) [ 22/Mar/12 ] |
|
Mark, we will be fixing sharding to support the {files_id:1, n:1}shard key (via the filemd5 command) in the future which will help for 2.2, but this might help in the meantime, and until people can upgrade their servers. |
| Comment by Mark [ 22/Mar/12 ] |
|
I highly recommend this fix. Sharding creates a hotspot otherwise. |
| Comment by Scott Hernandez (Inactive) [ 27/Feb/12 ] |
|
There are reasons you might want to use a custom files_id which isn't an ObjectId independent of the shard/hash issue. |