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

Remove namespace field from config.chunks

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Linked BF Score:
      0

      Description

      Following the addition of collection uuids in config.chunks documents, it is possible to get rid of the ns field as long as there is no downgrade.

      • Amend SERVER-52767 downgrade/upgrade hooks to add/remove ns to the documents
      • Change ChunkType::NS queries currently targeting by namespace to target by (namespace || uuid) && epoch in order to ensure chunk operations compatibility during downgrade/upgrade (nss || uuid) and to be sure to don't pick chunks from a recreated collection following a rename (&& epoch)
      • Change the CatalogCacheLoader to read config.chunks with a snapshot read concern at the clusterTime the previous read to config.collections returned.
      • In the ConfigServerCatalogCacheLoader, when reading config.chunks, pass a hint to enforce the use of either the 'ns_1_lasmod_1' or 'uuid_1_lastmod_1' index to ensure that config.chunks has a format consistent with what we inferred from the previous read to config.collections.
      • If at the time of reading the config.collections we find that in has a 'timestamp', then we will target the chunks by 'collectionUUID'. Otherwise, we will keep targeting the chunks by 'ns'.

      Testing:

      • Add a unit test into initial_split_policy_test.cpp to assert that either namespace either UUID is present in the chunks document
      • Add unit tests around the new query logic

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jordi.serra-torrens Jordi Serra Torrens
              Reporter:
              pierlauro.sciarelli Pierlauro Sciarelli
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: