missing revalidation?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start in cache/cache.go at the linked code around line 126 and trace how fetch() releases and reacquires the lock. Check which cache operations can run during the fetch and whether any can make the pending insert invalid. Done means establishing whether revalidation is needed and, if so, defining the behavior before making a change.
Written by the indexing model from the issue text.
Description
Hello, it appears a lock is dropped before a potentially long-running operation, and then reacquired before continuing. This is fine. However, it appears that there is no confirmation that the update is still legal after reacquiring the lock.
Are there any operations that could be performed while fetch() is executing that would invalidate the cache in such a way that the insert should be failed instead of continuing?
https://github.com/juju/utils/blob/bf9cc5bdd62dabc40b7f634b39a5e2dc44d44c45/cache/cache.go#L126
Thanks
- Dominant language
- Go
- Stars
- 209
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from juju/utils
Similar issues
-
agent-research-finding chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jordansmall/spindrift#7370 ·
Maintainers usually reply within 1 day
-
☢️ Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
The repo's gates check is clean and runs need no swapsPossibly taken @turbot-agent-fleet claimed this today. Openagent:ready
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
turbot/tailpipe#677 · 2 comments ·
Maintainers usually reply within 1 day
-
needs-kind needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
crossplane-contrib/provider-keycloak#806 ·
Maintainers usually reply within 1 day