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

listCollection returns duplicate view names

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.15, 6.0.4, 6.2.0-rc5, 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.2, v6.0, v5.0
    • Hide

      Applies the provided patch ( repro_multiple_views_same_nss.patch ) on top of r6.2.0-alpha-757-g5e64359d2af and run:

      resmoke.py --jobs 1 --mongodSetParameters="{logComponentVerbosity: {sharding: 3, storage: 3}}" --suite=concurrency_sharded_replication jstests/concurrency/fsm_workloads/create_all_type_collections.js --repeatTests 50
      
      Show
      Applies the provided patch ( repro_multiple_views_same_nss.patch ) on top of r6.2.0-alpha-757-g5e64359d2af and run: resmoke.py --jobs 1 --mongodSetParameters="{logComponentVerbosity: {sharding: 3, storage: 3}}" --suite=concurrency_sharded_replication jstests/concurrency/fsm_workloads/create_all_type_collections.js --repeatTests 50
    • Execution Team 2022-11-14, Execution Team 2022-12-12, Execution Team 2022-11-28, Execution Team 2022-12-26

      While experimenting with a new FSM test I ended up with two views in the local catalog that have the same name.
      This is the output of listCollection command:

          {
              "name" : "coll_1",
              "type" : "timeseries",
              "options" : {
                  "timeseries" : {
                      "timeField" : "time",
                      "granularity" : "seconds",
                      "bucketMaxSpanSeconds" : 3600
                  }
              },
              "info" : {
                  "readOnly" : false
              }
          },
          {
              "name" : "coll_1",
              "type" : "view",
              "options" : {
                  "viewOn" : "coll_6",
                  "pipeline" : [
                      {
                          "$match" : {
                          }
                      }
                  ]
              },
              "info" : {
                  "readOnly" : true
              }
          },
          {
              "name" : "coll_6",
              "type" : "collection",
              "options" : {
              },
              "info" : {
                  "readOnly" : false,
                  "uuid" : UUID("f7762c48-df15-4ea0-8971-36451a74632b")
              },
              "idIndex" : {
                  "v" : 2,
                  "key" : {
                      "_id" : 1
                  },
                  "name" : "_id_"
              }
          },
          {
              "name" : "system.buckets.coll_1",
              "type" : "collection",
              "options" : {
                  "validator" : {
                      "$jsonSchema" : {
                          "bsonType" : "object",
                          "required" : [
                              "_id",
                              "control",
                              "data"
                          ],
                          "properties" : {
                              "_id" : {
                                  "bsonType" : "objectId"
                              },
                              "control" : {
                                  "bsonType" : "object",
                                  "required" : [
                                      "version",
                                      "min",
                                      "max"
                                  ],
                                  "properties" : {
                                      "version" : {
                                          "bsonType" : "number"
                                      },
                                      "min" : {
                                          "bsonType" : "object",
                                          "required" : [
                                              "time"
                                          ],
                                          "properties" : {
                                              "time" : {
                                                  "bsonType" : "date"
                                              }
                                          }
                                      },
                                      "max" : {
                                          "bsonType" : "object",
                                          "required" : [
                                              "time"
                                          ],
                                          "properties" : {
                                              "time" : {
                                                  "bsonType" : "date"
                                              }
                                          }
                                      },
                                      "closed" : {
                                          "bsonType" : "bool"
                                      },
                                      "count" : {
                                          "bsonType" : "number",
                                          "minimum" : 1
                                      }
                                  },
                                  "additionalProperties" : false
                              },
                              "data" : {
                                  "bsonType" : "object"
                              },
                              "meta" : {
                              }
                          },
                          "additionalProperties" : false
                      }
                  },
                  "clusteredIndex" : true,
                  "timeseries" : {
                      "timeField" : "time",
                      "granularity" : "seconds",
                      "bucketMaxSpanSeconds" : 3600
                  }
              },
              "info" : {
                  "readOnly" : false,
                  "uuid" : UUID("d4fb7f04-52bf-436c-b003-787e62d72cee")
              }
          },
      

      There are two entries for coll_1 one of type timeseries and the other is of type view

            Assignee:
            yuhong.zhang@mongodb.com Yuhong Zhang
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: