collMod should do all global/authoritative catalog changes under the critical section

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 9.1.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • 3
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      collMod can acquire the critical section (block CRUD) if, in addition to the local catalog, it also needs to changes the global and shard authoritative catalog (currently this is only the case for timeseries parameter changes).
       
      However collMod uses the critical section in a way differently than other DDLs:

       
      We believe this is correct but it makes collMod tricky to reason; for example checkMetadataConsistency assumes that "not in critical section implies catalog stability" for delayed secondaries but this is not true for collMod.
       

      Proposed fix

      • Always acquire the critical section on the DB-primary shard.
      • Do not release the critical section until all global+shard authoritative+local catalog changes are done.

            Assignee:
            Unassigned
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: