dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.1k stars 2.04k forks source link

Does orleans transfer grain module to another silo? #8730

Closed christallire closed 11 months ago

christallire commented 12 months ago

I have a strange situation.

I'm injecting singleton service to grain, when I rollout new version of grain the service is created. and then strange thing is happened. I put a log to make sure the singleton service is created only once but it was created twice. eventually renamed various methods to make sure it's really same code but somehow the old service is retrieved and injected. the symptom gone once I put the entire cluster down and restart again.

so my question is: Does orleans transfer grain module to another silo? It doesn't make sense unless I get old module back.

.NET8 / orleans 7.2.3

christallire commented 12 months ago

If so, is there anyway to disable it?

ReubenBond commented 12 months ago

Orleans doesn't transfer dlls to other hosts - it does no magic with dlls at all. If you are seeing double logging of some thing, it's either a logging issue (eg logs are being duplicates, possibly misconfigured) or a dependency injection issue (eg multiple DI containers or incorrect registration)

christallire commented 12 months ago

That's odd. I tried to rename method with [MethodImpl(MethodImplOptions.NoInlining)] to avoid inlining and captured a few stacktraces when it happened. both methods (before and after renaming) exists... :|

Thanks anyways, I'll get back here if I find something

ReubenBond commented 12 months ago

If you show some code, etc, we might be able to help

ReubenBond commented 11 months ago

I'll close this now, since the initial question has been answered. Please open a new issue and reference this one if you do find something we can help with.