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

Adapt tests to rely on new timeseriesBucketsMayHaveMixedSchemaData catalog option format

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.3, v7.0, v6.0
    • CAR Team 2024-07-22
    • 200

      The changes committed under SERVER-91195 introduced a clonable format for "special" timeseries catalog options that were not properly cloned in previous [sub-]versions (e.g. timeseriesBucketsMayHaveMixedSchemaData).

      This enabled the possibility of resharding collections with such option (previously failing with CannotInsertTimeseriesBucketsWithMixedSchema), with the wrinkle that migrations will now only clone the new format. Because of that, tests checking for timeseriesBucketsMayHaveMixedSchemaData should be adapted to take into account the new format (this is an example).

      Detailed format change

      Before

      {
          "db" : "timeseries_update_mixed_schema_bucket",
          "name" : "system.buckets.ts",
          "type" : "collection",
          "md" :

      Unknown macro: {         "ns" }

      ,
                  "clusteredIndex" : true,
                  "timeseries" :
      Unknown macro: {                 "timeField" }
              },
              "indexes" : [
                  {
                      "spec" :

      Unknown macro: {                     "v" }

      ,
                          "name" : "m_1_t_1"
                      },
                      "ready" : true,
                      "multikey" : false,
                      "multikeyPaths" :
      Unknown macro: {                     "meta" }
      ,
                      "head" : NumberLong(0),
                      "backgroundSecondary" : false
                  }
              ],
              "timeseriesBucketsMayHaveMixedSchemaData" : true
          },
          "idxIdent" :
      Unknown macro: {         "m_1_t_1" }
      ,
          "ns" : "timeseries_update_mixed_schema_bucket.system.buckets.ts",
          "ident" : "collection-7-18244447409794218110"
      }

      After

      {
          "db" : "timeseries_update_mixed_schema_bucket",
          "name" : "system.buckets.ts",
          "type" : "collection",
          "md" :

      Unknown macro: {         "ns" }

      ,
                  "clusteredIndex" : true,
                  "timeseries" :
      Unknown macro: {                 "timeField" }
                  "storageEngine": {
                               "wiredTiger": {
                                                   "configString": "app_metadata=(formatVersion=1,timeseriesBucketsMayHaveMixedSchemaData=true)"
                       *   }
                  }*
              },
              "indexes" : [
                  {
                      "spec" :

      Unknown macro: {                     "v" }

      ,
                          "name" : "m_1_t_1"
                      },
                      "ready" : true,
                      "multikey" : false,
                      "multikeyPaths" :
      Unknown macro: {                     "meta" }
      ,
                      "head" : NumberLong(0),
                      "backgroundSecondary" : false
                  }
              ],
          },
          "idxIdent" :
      Unknown macro: {         "m_1_t_1" }
      ,
          "ns" : "timeseries_update_mixed_schema_bucket.system.buckets.ts",
          "ident" : "collection-7-18244447409794218110"
      }

            Assignee:
            robert.sander@mongodb.com Robert Sander
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: