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

Reevaluate the global index catalog persistence format

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • Catalog and Routing

    Description

      Currently in the config.shard.indexes and config.csrs.indexes we store one document per index, however, considering there won't be too many documents, and trying to make the operations easier to do, we should consider having just one document per collection, and having the indexes as a key-value pair having the index name as the key, that is, instead of:

      {
          _id: <uuid>_<indexName1>, 
          indexName: <indexName1>, 
          collectionUUID: <uuid>, 
          keyPattern: <keyPattern1>,
          options: <options>
      },
      {
          _id: <uuid>_<indexName2>, 
          indexName: <indexName2>,
          keyPattern: <keyPattern2>,
          options: <options>
      },
      ...
      

      Having:

      {
          _id: <uuid>,
          <indexName1>: {
              indexName: <indexName1>, 
              collectionUUID: <uuid>, 
              keyPattern: <keyPattern1>,
              options: <options>
          },
          <indexName2>: {
              indexName: <indexName2>,
              keyPattern: <keyPattern2>,
              options: <options>
          },
         ...
      }
      

      This would make other operations easier, like for example, the rename.

      Attachments

        Activity

          People

            backlog-server-catalog-and-routing Backlog - Catalog and Routing
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: