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

Remove full namespace from range deletion task documents (only leave db)

    XMLWordPrintableJSON

Details

    • Sharding EMEA 2023-07-10, Sharding EMEA 2023-07-24, Sharding EMEA 2023-08-07, Sharding EMEA 2023-08-21, Sharding EMEA 2023-09-04, Sharding EMEA 2023-09-18, Sharding EMEA 2023-10-02, Sharding EMEA 2023-10-16, Sharding EMEA 2023-10-30, CAR Team 2023-11-13, CAR Team 2023-11-27, CAR Team 2023-12-11, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19

    Description

      Under SERVER-67778, the range deletion code was changed to delete documents by getting a collection via `db + collection UUID` rather than simply using the namespace (that was not allowing to differentiate between different incarnations of the same collection - relying on workarounds to ensure correctness).

      Purpose of this ticket is to start storing only the database name rather than the nss field: it is needed to keep at least the db name in the document because it's not possible to identify a collection only via UUID (either full namespace, either db name + collection UUID).

      The change would have some implications on downgrade/upgrade.

      • On upgrade
        • Drain and block DDLs (rename might commit entries in the old format)
        • Hold the scoped range deleter lock
        • Update nss to only keep the db name
      • On downgrade
        • Drain and block DDLs (rename might commit entries in the new format)
        • Hold the scoped range deleter lock
        • Update nss to include again the full collection name

      Alternative (more simple):

      • Start writing a "dbName" field to new range deletion documents in 8.x
      • On upgrade to v8.0, add "dbName" to all documents coming from the past not containing it
      • On upgrade to v8.1 remove the unused "nss" field from range deletion docs (and re-add it on downgrade)

      Attachments

        Activity

          People

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: