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

Add Service with ClusterRole::None

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch

      Sometimes, ServiceContext and Services are used in a context that is utterly divorced from concepts like routing, one such example being mongocryptd. In the case of mongocryptd, it needs to create clients, but can't cleanly make a decision on which Service to associate those Clients with because neither ShardServer nor RouterServer are applicable to the context in which mongocryptd operates.

      Add support for creating Service objects with ClusterRole::None. Ideally, add some guardrails against using ClusterRole::None Service objects in contexts where ShardServer or RouterServer can be applicable (i.e., as far as I can tell, the only places it should be used are in non-mongo

      {d,s}

      binaries).

      Introducing this would help efforts in SERVER-82227 to get closer to completely deprecating and removing the no-argument ServiceContext::getService() method; without this, we would either need the no-argument method or use an inappropriate ClusterRole to be explicitly specified which will lead to confusing code. As an added benefit, a ClusterRole::None Service object might help to detect when binaries that shouldn't be conducting router or shard behavior are doing so.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: