Skip to content
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

Try to resolve state sessions race condition #977

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

richard-to
Copy link
Collaborator

I was not able to reproduce the bug via the integration tests, but this has definitely happened once for me.

This change tries to at lease the reduce the chance of the race condition where we loop through the cache and one of the items has been removed.

Changes:

  1. Reduce frequency of trying to clear state cache
  2. Add mutex when getting the cache keys
  3. Add some additional checks in case cache key does not exist.

Closes #878

I was not able to reproduce the bug via the integration tests, but this
has definitely happened once for me.

This change tries to at lease the reduce the chance of the race
condition where we loop through the cache and one of the items has been
removed.

Changes:

1. Reduce frequency of trying to clear state cache
2. Add mutex when getting the cache keys
3. Add some additional checks in case cache key does not exist.
@richard-to richard-to merged commit 4efc711 into google:main Sep 20, 2024
6 checks passed
@richard-to richard-to deleted the stale-session-concurrency branch September 28, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure with state session
2 participants