Reduce contention on ShardingState::_mutex for insert workloads

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.6.0-rc3
    • Component/s: Sharding
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, each write that's part of a batch performs two separate checks for shard version. Once at the beginning of the batch and a second time when the write has been written to the oplog.

      Performing these checks causes a hot mutex to be acquired in order to retrieve the sharding state for the collection, so the first one should ideally be removed.

            Assignee:
            Kaloian Manassiev
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: