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

Do not copy replica set config when accessing it

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Replication
    • Fully Compatible
    • v5.0, v4.4, v4.2, v4.0
    • Repl 2021-06-14, Repl 2021-06-28
    • 120

      ReplicationCoordinatorImpl::getConfig() copies the whole config which can be a subtle performance trap as we have seen in SERVER-40250. It's an issue in SERVER-46186's patch as well.

      We can either return a const reference or expose a way to call member functions on the config without copying it.

            Assignee:
            carolyn.duan@mongodb.com Carolyn Duan (Inactive)
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: