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

NullReferenceException on blocked task when original task faulted #193

Conversation

rgueldenpfennig
Copy link
Contributor

This pull request fixes the described issue in #192
When a getter of a cache key is throwing an exception, from now on this exception will be set on the correlating task completion source, instead of setting the result to null.

A specific unit test to ensure this behavior was added: GetOrSet_ConcurrentAccess_OnException
Furthermore I added another unit test, that ensures the happy path, either with value and null.

I was not able to execute the whole test suite because I'm missing Redis and Mongo on my current machine. Would be great if someone else could validate the complete test suite. Hope that's okay.

@rgueldenpfennig rgueldenpfennig changed the title Nullreferenceexception on concurrent access NullReferenceException on blocked task when original task faulted Nov 5, 2021
@Turnerj Turnerj added the bugfix label Nov 5, 2021
Copy link
Member

@Turnerj Turnerj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me mate!

@Turnerj Turnerj merged commit d251195 into TurnerSoftware:main Nov 5, 2021
@Turnerj Turnerj linked an issue Nov 5, 2021 that may be closed by this pull request
@rgueldenpfennig rgueldenpfennig deleted the nullreferenceexception-on-concurrent-access branch November 5, 2021 15:06
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.

NullReferenceException on blocked task when original task faulted
2 participants