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

Document gRPC Server::start() function

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability

      When starting the gRPC server, we call AddListeningPort on each provided address, which fills in the boundPorts array with the ports gRPC will use. We then update our own mapping of gRPC listening addresses by capturing each address from _options.addresses as a reference and rewriting that memory to use the newly populated port in boundPorts. These two pieces of startup code and not clearly related, and it is easy to miss that we are rewriting the reference in the map, which can lead to confusion when reading the startup code.

      We should add a comment explaining this logic.

            Assignee:
            Unassigned Unassigned
            Reporter:
            erin.mcnulty@mongodb.com Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: