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

Avoid the usage of dropCollectionEvenIfSystem() outside of resharding code

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20

    Description

      As part of SERVER-69603, the ensureCollectionDropped() function of src/mongo/db/s/resharding/resharding_data_copy_util.cpp was promoted to a generic sharding utility (sharding_ddl_util::ensureCollectionDroppedNoChangeEvent()) to drop both user and system collections.

      As SERVER-71880 demonstrated, such approach was flawed, since the utility function contained a method of the local catalog that cannot be safely used outside the context of a resharding operation.

      To avoid similar issues in the future,

      • ensureCollectionDroppedNoChangeEvent() should be removed from sharding_ddl_util
      • the original version of ensureCollectionDropped() should be reintroduced.

      Attachments

        Activity

          People

            enrico.golfieri@mongodb.com Enrico Golfieri
            paolo.polato@mongodb.com Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: