Manage connected client information via a decoration on the service context

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Networking
    • Fully Compatible
    • Platform 5 06/26/16
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ClientBasic current caches information about the connected network client by holding an AbstractMessagingPort pointer. This pointer is accessed from a few places in the database layer, notably:

      • src/mongo/db/auth/sasl_commands.cpp
      • src/mongo/db/commands/authentication_commands.cpp
      • src/mongo/db/repl/replset_commands.cpp

      This couples the database implementation to details of the network implementation. Additionally, the last instance, in the replication code, makes use of the connection tagging facility, which is currently managed by a global "Ports" object instantiated inside messaging_port.cpp, which is used to implement MessagingPort::closeAllSockets.

      Rather than allowing the database layer direct access to the socket types and using globals to track connections, we should create a new connection management facility, and attach it to the service context. The connection management facility would be responsible for providing database Client level access to information about the network (local and remote addresses, X509 names, etc.), and for managing tagging and global actions on connected clients.

            Assignee:
            DO NOT USE - Backlog - Platform Team
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: