Move global state to explicit var to allow deallocation?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 539
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have a use case for, while not restarting the application, bringing down groupcache allocated resources (let the GC release them), then recreate those resources with new configurations.
I see the global state is the obvious roadblock for that scenario.
So I started to sketch a change to allow recreation of groupcache resources. I am keeping existing APIs unchanged and adding some alternative APIs with support for an extra argument for explicit state ("workspace") provided by the caller. Hence the caller would be able to drop references to workspace in order to allow the garbage collector to get rid of its resources.
Draft PR: https://github.com/mailgun/groupcache/pull/65
What do you think? Would this be generally useful for a wider audience?
Cheers,
Everton
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the global state and the draft PR #65 mentioned in the issue. Trace how the existing APIs hold groupcache resources and compare them with the proposed explicit workspace APIs. Done means reaching agreement on an API that permits resource recreation and allows unused resources to become collectible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100