[SERVER-69835] Add functionality for PrimaryOnlyService for cleaning up instances Created: 20/Sep/22 Updated: 21/Mar/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Backlog - Service Architecture |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently, instances are mainly released via the opObserver callback. However, there are cases when the PrimaryOnlyService instance can exist in the registry but with no corresponding document in the database. Users of PrimaryOnlyService will have to remember to call releaseInstance manually in these cases. The suggestion for this ticket is to provide a function that performs both deleting the state document and unconditionally releasing the instance to minize users from forgetting to release the instance manually. |