opened
talarari
username_0
We're using a timeout for slow storage request, but since the built in blob storage provider doesn't expose any time out configuration we just stop waiting for the task to complete instead of canceling it (basically racing it with a timeout task, we're using Polly's pessimistic timeout for this).

What effect does something like that have in Orleans?
What happens if I don't await an async operation
issue
created
ReubenBond
username_1
It's fine to not await a storage call from the grain's perspective. Just be sure that you call `.Ignore()` on the result so that it does not bubble up to the UnobservedTaskException handler.

As soon as you return from the async grain method (or the task returned from the grain method completes), other messages can be processed and they will be interleaved on the activation's task scheduler with the new message.

One issue that may come up is that the interleaving of calls may result in inconsistent state exceptions. To guard against that, you can put your writes to storage behind an AysncLock (you can find implementations of such a lock in the Nito.AsyncEx library or in online articles, or in the Orleans codebase - but that one is not publicly exposed).
comment
created
talarari
username_0
We ended up copying over the blob storage provider code and adding a timeout with cancellation token. Thanks.
comment
closed
talarari
username_0
issue