[SERVER-61039] Sharded time-series listIndexes should report the view's namespace Created: 27/Oct/21 Updated: 29/Oct/23 Resolved: 12/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0, 5.0.5, 5.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Percy | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.1, v5.0
|
||||||||||||
| Sprint: | QE 2021-11-01, QE 2021-11-15, QE 2021-11-29 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
If I run the listIndexes command on a time-series view, normally it returns the name of the view as "ns":
But if it's a sharded time-series view, instead it replies with the name of the buckets collection:
I think it should return the name of the view in both cases, since the buckets collection is an implementation detail. Sounds like this happens because mongos translates a listIndexes request on the view, to listIndexes on the buckets collection. So it needs to also translate the response. |
| Comments |
| Comment by Githook User [ 18/Nov/21 ] | |||||||||
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit e2089fc73a76db6bcf2ca2729e7e886258d3ad2f) | |||||||||
| Comment by Githook User [ 17/Nov/21 ] | |||||||||
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit e2089fc73a76db6bcf2ca2729e7e886258d3ad2f) | |||||||||
| Comment by Githook User [ 12/Nov/21 ] | |||||||||
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: | |||||||||
| Comment by Kyle Suarez [ 12/Nov/21 ] | |||||||||
|
arun.banala, is this actually resolved? I don't see a Git hook user comment with the commit landing on master. | |||||||||
| Comment by David Percy [ 27/Oct/21 ] | |||||||||
|
This is one of the ways time-series views are different from other views, to make them behave more like a collection. We support createIndexes / listIndexes / dropIndexes on the view, so that you don't have to interact with the buckets collection directly. Internally, we translate each index key to something that makes sense for the bucket format. | |||||||||
| Comment by Kyle Suarez [ 27/Oct/21 ] | |||||||||
|
I was surprised this is allowed at all, since normally you cannot run the listIndexes command on a view:
|