Throw if `IGrainFactory.GetGrain<T>` is called before client is fully initialized
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
We ought to at least throw an informative error message in this case.
Alternatively, we could create an instance of the target grain reference without a valid `GrainType` and resolve the grain type + update the reference once the client does connect. This would likely give the best user experience, but it's complicated because we need to capture everything required to resolve the grain call. Potentially, we could allocate some class which represents the `GetGrain` method call as well as target method call, the and attach it to the `GrainReference`.
There is also the chance that a grain call is preventing startup (user error), so we should likely emit a warning log if the client has not begun initialization.
Contributor guide
Assessment
This issue has not been assessed yet.