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

Implement simple API to get/set app_metadata from/to wiredtiger config strings

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

      Motivation

      In order to complete SERVER-91195, we should provide a backportable solution taking into account that collection cloning procedures are always:

      1. Calling into listCollections.
      2. Extracting the options and indexes fields from the listCollections output.
      3. Creating collections in the catalog with such options/indexes.

      It follows that any catalog parameter should be somehow included in the metadata as part of the options or indexes sub-objects. The options object is the most suitable for hosting collection properties, but we must take into account the following limitations: 

             A. Collection options are strict (can't add new top-level fields to the options object).

             B. Time-series options are strict (can't new top-level fields in the options.timeseries sub-object).

      Due to (A) and (B) the only viable way to include some collection option in older [sub-]versions without breaking parsing and backwards compatibility would be adding this information to some of the existing collection options sub-objects.

      The storageEngine sub-object is the only suitable parameter because it's the only one that can be modified without breaking parsing: it can contain an app_metadata field supposed to host metadata useful for WT users (such as the mongodb catalog) and totally ignored by the storage engine.

      Objective

      Purpose of this ticket is to provide a simple set of abstractions to manipulate storage engine config strings (passed as BSON or as std::string):

      • Get a flag from a storage engine config string
      • Set (add/edit) a flag on a storage engine config string

      Given the current use cases, at moment we only need to provide support for boolean flags.

            Assignee:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: