[DOCS-16588] [SERVER] Investigate changes in SERVER-77112: shardCollection and createIndex create different indexes on time-series buckets collections Created: 16/Jan/24 Updated: 22/Jan/24 |
|
| Status: | Backlog |
| Project: | Documentation |
| Component/s: | Server |
| Affects Version/s: | None |
| Fix Version/s: | 7.3.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Backlog - Core Eng Program Management Team | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | backlog, feature | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 3 weeks, 1 day ago | ||||||||
| Description |
|
Original Downstream Change Summary . Previously the index with the key {control.min.time: 1}was created, but this was incorrect. Now we create an index with the key {control.min.time: 1, control.max.time: 1}. Additionally, the name of the index is changed to match the name of the index on unsharded collections. Now the name of the index will be "time_1". Previously the name was "control.min.time_1". This change is gated behind the feature flag AuthoritativeShardCollection which is targeted to be enabled in 8.1. Without the feature flag enabled, no changes are expected. I will update these tickets if the feature flag is enabled earlier. Description of Linked TicketIf you create a sharded time-series collection using the shardCollection command that has a shardKey {timeField: 1} the resulting index in the buckets collection will have the key { control.min.time: 1.0 }. However, calling the createIndex command on a sharded time-series collection with the same key {timeField: 1} results in an index in the buckets collection with the key { control.min.time: 1.0, control.max.time: 1.0 }. These two indexes have the same key for the view backing the buckets collection. We should investigate if these two commands should produce indexes with the same keys for the buckets collection. Here is a file to reproduce this [^SERVER-77112.js] |