[SERVER-77808] Change PrimaryOnlyServiceRegistry::_servicesByNamespace to use NamespaceString as the key Created: 05/Jun/23 Updated: 29/Oct/23 Resolved: 08/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sophia Tan | Assignee: | Sophia Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | ntdi_must_have | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Serverless
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | QE 2023-06-12 | ||||||||
| Participants: | |||||||||
| Story Points: | 1 | ||||||||
| Description |
|
The `PrimaryOnlyServiceRegistry::_servicesByNamespace` uses string key. We will change it to useĀ NamespaceString. |
| Comments |
| Comment by Githook User [ 08/Jun/23 ] |
|
Author: {'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}Message: |
| Comment by Max Hirschhorn [ 06/Jun/23 ] |
|
Yes that is my understanding. I think it would be reasonable to add an invariant for that. We can also make the change you've proposed. My comment here is there is no real risk either way because of the design for PrimaryOnlyService. |
| Comment by Sophia Tan [ 06/Jun/23 ] |
|
max.hirschhorn@mongodb.com Thanks for your comments. Does that mean PrimaryOnlyServiceRegistry::_servicesByNamespace will never has tenant information in the NamespaceStrings? |
| Comment by Max Hirschhorn [ 05/Jun/23 ] |
I think this change is probably fine to make yet I think the description is somewhat misleading. I wouldn't expect there to be any tenant information in the NamespaceStrings of PrimaryOnlyServiceRegistry::_servicesByNamespace because PrimaryOnlyServices are registered statically at mongod startup and therefore independent of the set of tenants residing on a particular mongod. That is, the durable state for primary-only service Instances for different tenants is represented as separate documents within a single collection (with that collection probably in the config database). |