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

Remove `RouterServer` checks from `serverGlobalParams.clusterRole`

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 1

      Today, RouterServer is a role part of all nodes in a sharded cluster. The only possible combinations are:

      { ShardServer, RouterServer } => Shard
      { ShardServer, ConfigServer, RouterServer } => Config / Config-Shard
      { RouterServer } => MongoS
      

      With that, there are a lot of outdated calls in the codebase that do not rely that a node, part of a sharded cluster, has always a RouterServer. In the codebase this is checked as `serverGlobalParams.clusterRole.has(ClusterRole::RouterServer)`.

      It is important to point out that checking for `serverGlobalParams.clusterRole.hasExclusively(ClusterRole::RouterServer)` has a different meaning, as we are asking if that node is a MongoS.

      Goal

      We need to either remove RouterServer checks or change them to check if we are in a sharded cluster.

      References

       - Example 1
       - Example 2

      Estimation

       - User impact: Improvement.
       - Raw Estimation (man-day): 2

            Assignee:
            Unassigned Unassigned
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: