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

Do not copy replica set config when accessing it

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.0-rc0
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v5.0, v4.4, v4.2, v4.0
    • Sprint:
      Repl 2021-06-14, Repl 2021-06-28

      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

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

              Dates

              Created:
              Updated:
              Resolved: