[SERVER-27735] Remove uses of config.chunks' _id field Created: 18/Jan/17 Updated: 06/Dec/22 Resolved: 02/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Sharding
|
||||||||
| Sprint: | Sharding 2017-03-27 | ||||||||
| Participants: | |||||||||
| Description |
|
The value of _id is a string concatenation of namespace and minkey values. Reads/updates can instead by done directly on the ns and min, for which there is an index. We wish to eventually change the schema of the config.chunks collection, because it is not optimized. The first step is to stop using (reading) the _id field so that it can more easily (less backwards compatibility issues) be changed in future releases. It is currently used to identify documents in updates, which can be found by grepping for instances of ChunkType::name. For future reference, a first sketch of a more ideal schema is:
|
| Comments |
| Comment by Kaloian Manassiev [ 20/Dec/17 ] | ||||||
|
This ticket will become obviated as part of the config.chunks schema redesign happening under the 'Multi-versioned Routing Table' project. Putting it under this Epic, but there shouldn't be any work to be done specifically for this ticket. | ||||||
| Comment by Kaitlin Mahar [ 08/Dec/17 ] | ||||||
|
In attempting to make this change, ran into the issue that applyOps requires the query document in an update operation to contain an _id field (in code here). In particular, I changed the query document o2 from
to
And this causes jstests/sharding/addshard1.js to fail when attempting to split a collection into chunks (here). See log from that test failing here. So we will be unable to make these unless if applyOps changes. |