[SERVER-78810] Improve Cluster Role API usability Created: 10/Jul/23 Updated: 02/Feb/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Antonio Fuschetto | Assignee: | Backlog - Catalog and Routing |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | oldshardingemea, pm-635-milestone-3 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Catalog and Routing
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The current ClusterRole API exposes a set of very open and generic functions that don't auto-describe the real use causes that the callers want to achieve. In order to improve the readability of the code, the idea is to expose an API with clear function names that better descrive what they do. The instances of this class model the role (or roles) of the current process (node) that is actually a member of a sharded cluster. If the process is a standalone or a replica set member, then there is no cluster role. An draft idea is to have an API that looks as follows:
|
| Comments |
| Comment by Antonio Fuschetto [ 02/Feb/24 ] |
|
After an internal discussion, we spotted situations where it makes sense to have a more explicative API, e.g., to quicky identify if the process is a MongoS or MondD, a shard or a config server (only), etc. |