You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/12/24 02:15:44 UTC

[GitHub] [servicecomb-java-chassis] hongfeihuangseu opened a new issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?

hongfeihuangseu opened a new issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1485
 
 
   业务自己抛出的异常会被框架转换成503吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?

Posted by GitBox <gi...@apache.org>.
yhs0092 commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1485#issuecomment-568633816
 
 
   503是标准的HTTP状态码,表示[服务暂时不可用](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/503)。
   至于业务自己抛出的异常,默认情况下Java-Chassis是不认识的,会统一转换为590状态码,这个是Java-Chassis自定义的一个HTTP状态码。转换逻辑可以参考代码中的`org.apache.servicecomb.swagger.engine.SwaggerProducerOperation#processException`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?

Posted by GitBox <gi...@apache.org>.
yhs0092 commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1485#issuecomment-568643913
 
 
   > 是不是可以理解为业务自己抛出4XX异常是不会触发隔离机制的呢
   
   你是以何种方式抛出4XX异常的呢?如果这个4XX异常是你们业务定义的异常,那么Java-Chassis默认是无法识别的,实际上会转换为590错误返回,原理方面可以参考一下[异常处理](https://docs.servicecomb.io/java-chassis/zh_CN/general-development/error-handling.html)说明里面关于`org.apache.servicecomb.swagger.invocation.exception.ExceptionToProducerResponseConverter`的说明。
   
   如果在server端 Java-Chassis 确实没有识别你抛出的异常,转换为590错误返回的,那么就不会触发实例隔离了。关于实例隔离等机制的触发逻辑可以参考[这里](https://bbs.huaweicloud.com/forum/thread-12790-1-1.html)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 closed issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?

Posted by GitBox <gi...@apache.org>.
liubao68 closed issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1485
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] hongfeihuangseu commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?

Posted by GitBox <gi...@apache.org>.
hongfeihuangseu commented on issue #1485: 超时和503会触发隔离,那么这个503指的是什么呢?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1485#issuecomment-568634938
 
 
   > 503是标准的HTTP状态码,表示[服务暂时不可用](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status/503)。
   > 至于业务自己抛出的异常,默认情况下Java-Chassis是不认识的,会统一转换为590状态码,这个是Java-Chassis自定义的一个HTTP状态码。转换逻辑可以参考代码中的`org.apache.servicecomb.swagger.engine.SwaggerProducerOperation#processException`
   
   是不是可以理解为业务自己抛出4XX异常是不会触发隔离机制的呢

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services