1
1.3.0으로 업그레이드되었으며 일반 곡물에 문제가 있습니다.일반 orleans 곡물을 사용할 때 "키가 사전에 없습니다."
예 인터페이스와 클래스이 문제를 보여주는 것 그 : 사용 후
public interface IGenericTest<T> : IGrainWithIntegerKey
{
Task<T> PrintType(T obj);
}
public class GenericTestGrain<T> : Grain, IGenericTest<T>
{
public Task<T> Print(T obj)
{
Debug.WriteLine("TEST");
return Task.FromResult(obj);
}
}
그것을 좋아 : 곡식을 얻기
이var grain = await GrainFactory.GetGrain<IGenericTest<int>>(0); // Runs without error.
await grain.Print(1);
잘 될 것 같다,하지만 난 곡물에 메서드를 호출 할 때 받을 내용 :
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Orleans.InterceptedMethodInvokerCache.GetInterfaceToImplementationMap(Int32 interfaceId, Type implementationType)
at Orleans.InterceptedMethodInvokerCache.CreateInterceptedMethodInvoker(Type implementationType, Int32 interfaceId, IGrainMethodInvoker invoker)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Orleans.InterceptedMethodInvokerCache.GetOrCreate(Type implementationType, Int32 interfaceId, IGrainMethodInvoker invoker)
at Orleans.Runtime.InsideRuntimeClient.InvokeWithInterceptors(IAddressable target, InvokeMethodRequest request, IGrainMethodInvoker invoker)
at Orleans.Runtime.InsideRuntimeClient.<Invoke>d__57.MoveNext()
내가 빠진 것이 있습니까? 어쩌면 새로운 구성일까요? 이것은 내가 사용했던 이전 버전과 잘 동작했다.
EDIT :
providerRuntime.SetInvokeInterceptor ((있어서, 요청, 곡물, 호출자) => { 창 invoker.Invoke (그레인 요청 : 그것은 호출 인터셉터에 문제처럼
보인다), });
모든 것이 삭제되면 제거됩니다.
Orleans의 버그 인 것으로 보입니다. https://github.com/dotnet/orleans/issues/2358 –