Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-61039

Sharded time-series listIndexes should report the view's namespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.2.0, 5.0.5, 5.1.1
    • None
    • Fully Compatible
    • ALL
    • v5.1, v5.0
    • QE 2021-11-01, QE 2021-11-15, QE 2021-11-29

    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.

      Attachments

        Issue Links

          Activity

            People

              arun.banala@mongodb.com Arun Banala
              david.percy@mongodb.com David Percy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: