[SERVER-70445] Server crash when reading from sharded collections with user-created '<db>.system.buckets.<coll>' collection Created: 11/Oct/22 Updated: 29/Oct/23 Resolved: 11/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jordi Serra Torrens | Assignee: | Rushan Chen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | query-director-triage, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: |
|
||||||||||||
| Sprint: | QE 2022-11-28, QE 2022-12-12, QE 2022-12-26, QE 2023-01-09, QE 2023-01-23, Sharding EMEA 2022-10-31 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 105 | ||||||||||||
| Description |
|
Users should never create collections with the 'system.buckets' prefix. However, today nothing prevents it ( On a non time-series sharded collection <dbName>.<collName>, if the user manually creates the <db>system.buckets.<collName> collection, reads on the sharded collections will crash the server. This is because this logic will choose the bucket namespace to install on the OperationShardingState alongside the attached shardVersion. Then, when calling getOwnershipFilter, the namespace <db>.<collName> won't be found on the OperationShardingState and and invariant will be tripped. One possible fix is to prevent users from creating the buckets collection ( Edit: This ticket is to fix the nss rewrite done on service_entry_point so that looks at the TimeseriesOptions to confirm whether it is really a timeseries collection. |
| Comments |
| Comment by Githook User [ 11/Jan/23 ] |
|
Author: {'name': 'Rushan Chen', 'email': 'rushan.chen@mongodb.com', 'username': 'ruchen'}Message: |
| Comment by Rushan Chen [ 09/Jan/23 ] |
|
While this ticket solves (1), I agree we should also do (2) above. |