Skip taking CSSLock when acquiring CSS on non-shardsvr nodes

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0, 7.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v7.0
    • Sharding EMEA 2023-05-01
    • 100
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-69435 changed the CollectionShardingState acquisition to always take the CSSLock, rather than taking it later when accessing some of it's data (e.g. checking the shardVersion, getting the collection description). On non-shardsvrs, accessing the CSS data didn't even take the CSSLock.

      After SERVER-69435, the CSSLock is taken at acquisition time, both for shard and non-shard servers. This caused performance regression on non-sharded deployments. Since for non-sharded deployments the CSSLock is not really necessary, we can skip it and improve performance.

            Assignee:
            Jordi Serra Torrens
            Reporter:
            Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: