[SERVER-60644] sharding time series on timeField should return better error message Created: 13/Oct/21 Updated: 06/Dec/22 Resolved: 22/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Rushan Chen | Assignee: | Backlog - Query Execution |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Participants: | |||||||||
| Description |
|
currently (5.1) db.runCommand({ create: "tscoll", timeseries:{timeField: 'time', metaField: 'id' }}) db.adminCommand({ shardCollection: "test.tscoll", key: { time: "hashed" }, numInitialChunks: 6 } returns "errmsg" : "Invalid index spec for time-series collection: { time: \"hashed\" }. Indexes on the time field must be ascending or descending (numbers only): time: \"hashed\""
it shoudl instead alert the user the sharding on timeField should only be using range ("1") partitioning. |