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

XMLWordPrintableJSON

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

      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
              Reporter:
              Pol Pinol
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: