orleans: TypeLoadException: Unable to resolve type alias "("inv",[Orleans.Runtime.GrainReference]
Hey guys, is there some reason I can’t use same method name again?
For example, Let’s say I have following grain
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method();
}
and I’ve accidentally getting TypeLoadException: Unable to resolve type alias "("inv",[Orleans.Runtime.GrainReference] exception by changing signature like:
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method(int accidentParameter);
}
so I hot-fixed the grain by adding a new signature like:
[Version(1)]
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method();
Task NewMethod(int accidentParameter);
}
and everything went okay. (this was a painful experience tho…)
The problem is I cannot use the same method name again and wonder why is that so. I’ve completely deployed version 1 grain and trying to reclaim the method name back but Orleans kept throwing TypeLoadException again like interface below:
[Version(2)]
public interface ISomeGrain : IGrainWithIntegerKey
{
Task Method(int accidentParameter);
}
Here’s my question:
- Why am I not allowed to use the method name of the previous version?
- Why am I not allowed to accept consequences (having side effects, being not backward compatible) but getting runtime errors instead of making silent signature changes?
I have a staging environment of 12 different hetero silos (because of microservices…) and only 2 of them got interface signature changes deployed. The one is the silo where grain got implemented and the one is the silo where we have the client (via GrainFactory) and the client is throwing TypeLoadException even if I have deployed version 2 of the grain interface on both silos.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 29 (11 by maintainers)
Thank you for confirming, @sc-starman
It was my mistake that I didn’t update the client to 8.0.0-rc2, after update everything seems to be fine again.
thanks for the quick reply, the upgrade was from 8.2.0 to 9.0.1, but I just realized I updated an existing interface which was the actual reason of the errors.
@prfi01 there was a break in wire compatibility (my mistake, it was required to fix a rare bug). This won’t be an issue for messages stored in streams, but it prevents some messages from being compatible between 7.x hosts and 8.x hosts. If you shutdown the 7.x cluster and deploy an 8.x cluster it won’t be an issue.
Please accept my apologies for the trouble caused
@turowicz it could be due to that. I’ll see if it can be updated