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

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

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

      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 Unassigned
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: