Avoid the usage of dropCollectionEvenIfSystem() outside of resharding code

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Enrico Golfieri
              Reporter:
              Paolo Polato
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: