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

Remove the bitmask of ClusterRole API in favor of process type getters (Standalone / RS, Shard, Config, MongoS)

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

      Today, ClusterRole is defined by a bit mask that contains different combinations of its enumeration. This enum is composed of None, ShardServer, RouterServer and ConfigServer. But not all combinations for the clusterRole of a node are possible. After a lot of changes by the config shard and shards can act as routers, the values of the bit mask of each ClusterRole instance can be:

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

      Goal

      We need to remove the bit mask of the cluster role in order to move to a more restrictive API that only let the user check which is the role of the process in a simple manner. I propose to have different getters to know the specific role of the process (isShard, isConfig, isRouterOnly, ...).

      References

       - ClusterRole enum

      Estimation

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

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

              Created:
              Updated: