[SERVER-61041] Sharded time-series listIndexes should report the view's namespace Created: 27/Oct/21  Updated: 06/Dec/22  Resolved: 27/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Percy Assignee: Backlog - Query Optimization
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-61039 Sharded time-series listIndexes shoul... Closed
Assigned Teams:
Query Optimization
Operating System: ALL
Participants:

 Description   

If I run the listIndexes command on a time-series view, normally it returns the name of the view as "ns":

> db.runCommand({listIndexes: 'example'})
{
        "id" : NumberLong(0),
        "ns" : "test.example",
        "firstBatch" : [
                ...
        ]
}

But if it's a sharded time-series view, instead it replies with the name of the buckets collection:

> db.runCommand({listIndexes: 'example'})
{
        "id" : NumberLong(0),
        "ns" : "test.system.buckets.example",
        "firstBatch" : [
                ...
        ]
}

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.


Generated at Thu Feb 08 05:51:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.