-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with specific cache key #287
Comments
@dbhaasis are you able to provide a reproduction case for this? If you run this in an empty project, does it still happen? |
I don’t think it is easy to reproduce and it is likely a rare occurrence. It has only happened to data that is hit by automated tests. My only guess is a some type of timing issue if key is inserted at same time. It hasn’t happened for a while and the tests run every day.
David Haasis
Sent from my phone
… On Jul 9, 2022, at 5:02 AM, Isaac Whitfield ***@***.***> wrote:
@dbhaasis are you able to provide a reproduction case for this? If you run this in an empty project, does it still happen?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
Calls to Were you doing anything specifically complicated inside your fetch function? Obviously It makes sense to be something with the fetching service, as clearing the cache would not clear the state of fetches flowing through that service. |
I'm going to close this for now but feel free to follow up with a reproduction case or more information if you have any, and I can look again! |
It looks (tentatively) like this has been reproduced as a legitimate issue, so further discussion and work on this will happen in #319 where we're trying to work on a reproduction case! |
Ran into weird issue where a specific cache key seems to be getting in infinite loop or something. The cache (:resolver_cache) was set up with a short cache time of 1 second as only used to prevent multiple calls in same graphql request in absinthe.
Here is call that would never return.
Cachex.fetch(:resolver_cache, {:season_tags, 1707, 23702601}, fn {_,_,_} -> "something" end)
Changing any of the 3 values would make the call work as expected, but this combination of :season_tags and the 2 numbers caused the request to get stuck. We changed to use a string instead of atom for the sub area of the cache to make it work, but seems strange that the combination of values caused
fetch
to hang.UPDATE: So it seems to be an issue with the cache getting into a weird state and a specific key causing the issue. As this issue has happened several times. When in this state, clearing the cache does not fix the issue. Restarting the app does fix the issue. I'm guessing somehow the key is getting stored somewhere that doesn't actually show up as being in the cache and is in an invalid state which causes the fetch to hang.
The text was updated successfully, but these errors were encountered: