【问题标题】:What "Transient Exceptions" are handled by ServiceProxy?ServiceProxy 处理哪些“瞬态异常”?
【发布时间】: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 的所有实例

标签: c# azure-service-fabric


【解决方案1】:

根据远程处理的异常处理程序 (ServiceRemotingExceptionHandler.cs),代理似乎将处理以下错误:

  • 主节点移动时出现FabricNotPrimaryException
  • FabricTransientException 异常
  • FabricNotReadableException 异常

您可能仍希望自己处理超时异常。

【讨论】:

    猜你喜欢
    • 2012-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-24
    • 2017-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多