orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Fix leaking timed-out callbacks in InsideRuntimeClient

Open krasin-ga opened this issue 1 year ago • 2 comments

Callbacks for timed-out request messages in InsideRuntimeClient were never removed because they were unregistered by msg.TargetGrain, instead of msg.SendingGrain.

Microsoft Reviewers: Open in CodeFlow

krasin-ga avatar Jun 15 '24 19:06 krasin-ga

@dotnet-policy-service agree

krasin-ga avatar Jun 15 '24 19:06 krasin-ga

Just to note: I'm not quite happy with adding the GetRunningRequestsCount method to IRuntimeClient only for testing purposes, and I'm not sure that this leak should be tested at all

krasin-ga avatar Jun 15 '24 20:06 krasin-ga

Just to note: I'm not quite happy with adding the GetRunningRequestsCount method to IRuntimeClient only for testing purposes, and I'm not sure that this leak should be tested at all

It's ok, I'll just put a note there saying that it's for testing purposes only. We have a pattern of exposing test hooks via a test-specific interface. That would be an alternative approach, but I don't feel it's necesarry here.

ReubenBond avatar Jul 06 '24 18:07 ReubenBond