[SERVER-68779] Remove full namespace from range deletion task documents (only leave db) Created: 12/Aug/22  Updated: 06/Feb/24

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Unresolved Votes: 0
Labels: pm-2849-optimizations, range-deleter-cleanup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-69792 Mandatory `keyPattern` fields for ran... Blocked
Sprint: 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
Participants:

 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)

Generated at Thu Feb 08 06:11:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.