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

Rewriting actor state caching mechanism #1473

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

WhitWaldo
Copy link
Contributor

Description

The mechanism used to perform actor state caching was just about impossible to actually test and there is more than one issue indicating that something is wrong with how it's working. There are no current unit tests validating the entire caching mechanism and only one unit test for each of the get and set implementations (mostly validating TTL) on the actor state with its provider.

As there's a lot going on with the caching system through the actor state manager, it's been refactored out to a separate type that's far more easily maintainable and testable. I've written a collection of unit tests against the cache and am still working to build out still more unit tests to validate the ActorStateManager and then some E2E tests to validate and prove out both #1467 and #1471 as resolved (or otherwise identify where the issue lies).

As an added bonus, I've re-implemented each of the associated and new files to use nullable annotations on a per-file basis to get that effort underway.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1467 and #1471

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • [N/A] Extended the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actor TryGetStateAsync() is returning stale / previous state
1 participant