Allow transactions to refresh the routing information without bubbling up a ShardCannotRefreshDueToLocksHeld error

XMLWordPrintableJSON

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

      This ticket is the followup of SERVER-97512 investigation. Summarizing it:

      After SERVER-95393, the `ConfigServerCatalogCacheLoader` is used for routing information in the shard, meaning that the transaction machinery no longer needs to rely on the `ShardCannotRefreshDueToLocksHeld` error when encountering stale information in the `CatalogCache`. It can now refresh the cache without acquiring any locks, which avoids potential deadlocks. 

      As a result, calls to refresh the `CatalogCache` from a txn can use `allowLocks = false`, which allows for an explicit wait for the cache refresh without throwing a `ShardCannotRefreshDueToLocksHeld` error.

      Consequently, we can remove `allowLocks = true` from the following lines:

            Assignee:
            Unassigned
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: