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

Do not copy replica set config when accessing it

    XMLWordPrintableJSON

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: