【发布时间】:2018-03-25 00:44:27
【问题描述】:
查看Service Remoting article,可以看到以下内容:
如果发生瞬态异常,代理会重试调用。
代理特别认为什么是“瞬态异常”?
在过去,我们已经为 Reliable Collections 上的操作处理了 Timeout、InvalidOperation (See here)、FabricNotReadableException (See here) 和 FabricTransientExceptions - 我们是否应该对使用 SF Remoting 与其他服务的交互做同样的事情?
举个例子:
//Get Proxy
var serviceProxy = ServiceProxy.Create<IService>(GetServiceUri(), GetPartitionKey());
//Make Call to method which has no internal handling for transient SF failures...
//Should this be wrapped with a retry policy?
var result = await serviceProxy.GetAll();
【问题讨论】:
-
它可能在某个地方 in the code 所以也许可以得到代码并进行一些挖掘。
-
@PeterBons 谢谢!我没有意识到这一切都是开源的......看起来它在 Primary 移动时覆盖了 FabricNotPrimaryException 以及 FabricTransientException 和 FabricNotReadableException 的所有实例