Disallow setting the timeseries flags when creating a collection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 6.0.0, 7.0.0, 8.0.0, 8.2.0-rc0, 8.1.0
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • 3
    • TBD
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      There are two collection options in the catalog that apply only for timeseries collections:

      • timeseriesBucketsMayHaveMixedSchemaData
      • timeseriesBucketingParametersHaveChanged [Gated behind featureFlagTSBucketingParametersUnchanged]

      Those options only unlock query performance optimizations, and were originally designed as options hidden from listCollections, createCollection, etc.

       

      However, as a result of SERVER-91193 / SERVER-91194 / SERVER-91195, those options were migrated to md.options.storageEngine.wiredTiger.configString.

      Among others, this exposes those flags to the user such that they can be set while creating a collection, e.g.:

      db.createCollection("xyzzy", {
          timeseries: {timeField: 't'},
          storageEngine:
              {wiredTiger: {configString: "app_metadata=(timeseriesBucketsMayHaveMixedSchemaData=true)"}}
      });
      

       

      This adds complexity to collection creation, and has no benefit since the flags have no effect while the collection is empty.

       

      We should consider rejecting create commands that set those flags (note, however, this may be problematic for mongodump, so perhaps they should be ignored instead) .

            Assignee:
            Unassigned
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: