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

Prevent a rename DDL operation from starting if target namespace is not droppable

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • CAR Team 2024-05-13, CAR Team 2024-05-27, CAR Team 2024-06-10, CAR Team 2024-08-19, CAR Team 2024-09-02, CAR Team 2024-09-16
    • 1

      The rename DDL coordinator assumes that the operation will eventually succeed once the coordinator is at the kBlockCrudAndRename phase - which is the one that sends the local rename requests to all the shards -, so the coordinator will retry indefinitely on failure. This assumption can be made since all the preconditions that prevent the rename from succeeding are detected either at an earlier phase called kCheckPreconditions or right before constructing the DDL coordinator.

      In general, if the rename target collection is not droppable, the local rename will fail regardless of how many times the operation is retried. Therefore, the collections checked by validateNamespacesForRenameCollection() must be aligned with the isDroppable() function, otherwise, the rename DDL operation may hang forever as we've seen in the BF attached to this ticket.

      The purpose of this ticket is to make a direct call to isDroppable() under validateNamespacesForRenameCollection() to remove the need to keep both functions manually in sync.

            Assignee:
            Unassigned Unassigned
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: