[SERVER-3608] Sharding on geo sometimes fails due to shard key being too big Created: 16/Aug/11 Updated: 06/Apr/23 Resolved: 16/Aug/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo, Index Maintenance, Sharding |
| Affects Version/s: | 1.9.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christian Tonhäuser | Assignee: | Mathias Stearn |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
When writing objects with big arrays of geo coords, the writes will often fail with "Shard Key must be less than 512 bytes" error message. |
| Comments |
| Comment by Christian Tonhäuser [ 17/Aug/11 ] |
|
Hi Mathias, thanks for your reply. Sharding by ID is exactly what we'll be doing for the time being. |
| Comment by Mathias Stearn [ 16/Aug/11 ] |
|
The real issue is that sharding on an array is invalid because a doc could live on more than one shard. Unfortunately we don't check for this at the moment. Also, sharding on geo will probably not do what you want. I'd suggest just sharding on ID. |
| Comment by Christian Tonhäuser [ 16/Aug/11 ] |
|
Sorry, forgot something: , with coordinates being an array of spatial coordinates [[lon, lat, alt],[lon,lat,alt],...] |