dotnet / dotnet/orleans

'Extension not installed on grain' best practices

Open
#7,833 5 comments 0 reactions 1 assignee Claimed by @benjaminpetit View on GitHub
question
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
14h 42m
Merged PRs (30d)
354

Description

Hi,

Been running our Orleans application for a bit now and sometimes see the error `GrainExtensionNotInstalledException: Extension not installed on grain ...` in the logs.

I know that this is due to a grain subscribing to a stream initially but upon the next activation it doesn't resume the subscription and throws the exception when a message arrives.

I'm wondering what the best practice/approach to this error is? In my application grains subscribe to different streams ad-hoc and we persist the id to the grains state for resuming, but something must have gone wrong somewhere as in some instances we are missing the persisted id.

Some questions/points:

1. We can do fire and forget delivery but I think this is glossing over our actual issue at this point.
2. Is there a way of capturing the subscribing grain and the stream id of the one failing? Then I could potentially add it to persistence to fix up the grain state.
3. If a producer sends out a message on a stream with say 5 subscribers and the thirds one throws the exception, do the last two still receive the message? I was thinking about possibly wrapping the producer bit in a try/catch so it can carry on it's logic, but not sure if all subscribers will receive the message.

Basically wondering what I can do to live grains to fix up their state. These are long life grains so do need to ideally correct them.

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.