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

TrySaveStateAsync and TryDeleteStateAsync should only handle "rejections" based on ETag, not all RPC exceptions #426

Closed
rynowak opened this issue Oct 12, 2020 · 1 comment · Fixed by #531
Assignees
Labels
breaking-change kind/bug Something isn't working

Comments

@rynowak
Copy link
Contributor

rynowak commented Oct 12, 2020

Expected Behavior

TrySaveStateAsync or TryDeleteStateAsync should return false iff the operation was rejected due to a concurrency violation. The design intent of these methods is to treat expected failures (etag mismatch) separately from unexpected failures (network hiccup).

Users should be able to use the true/false return value to distinguish whether state was saved, and only use try/catch if they choose to handle arbitrary exceptions.

Actual Behavior

TrySaveStateAsync swallows all RpcExceptions

TryDeleteStateAsync swallows all Exceptions

Steps to Reproduce the Problem

Issue a call to TryDeleteState that's totally invalid (say an invalid key format), or when the network is disconnected. It will be surfaced as a false return value instead of an exception.

@rynowak rynowak added the kind/bug Something isn't working label Oct 12, 2020
@rynowak
Copy link
Contributor Author

rynowak commented Dec 17, 2020

Tagging this as a breaking change (not sure why it was missing). Moving from one valid (but not ideal) to another valid behavior is a breaking change 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants