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

Reevaluate the global index catalog persistence format

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Catalog and Routing

      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.

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

              Created:
              Updated: