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
Invoke interceptor broken for generic grains #2358
Comments
To clarify, the exact same code works in 1.2.3/1.2.4? |
I wasn't using the SetInvokeInterceptor before. I just updated from 1.1.3 to 1.3.0. so didn't have it as an option. Was using a custom wrapping before. |
Then sounds like a bug (unsupported case) with interceptors. |
If there's a quick fix, we could include it in 1.3.1 that we are in the process of assembling. |
In the InterceptedMethodInvokerCache.GetInterfaceToImplementationMap method, the line that is failing is:
The problem is that the interfaceId is from the message, which I think is the compile-time id, whereas the dictionary is being built by the runtime interface (I think). Maybe it should fallback to the passed in type?
Although that doesn't seem entirely correct, since that would be grabbing the methods from a non-interface? |
There was a similar question, generic grains without interceptors, on Stack overflow. |
@gabikliot It is probably mine. I asked there before I discovered the interceptor thing and decided it was a bug (unsupported case) in Orleans. |
Hi @dancvogel, the issue has been fixed in master and will be included in the next release |
Just upgraded to 1.3.0 and am having issue with generic grains.
An example interface and class that's showing this issue:
Also have invoke interceptor setup up, for simplicity looks like this:
then using the grain like:
Getting the grain seems to be fine, but when I call the method on the grain I get:
When I remove the SetInvokeInterceptor call everything is happy. Seems like the code is trying to use the typed interface name as the key instead of the generic.
The text was updated successfully, but these errors were encountered: