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 2021/09/16 03:41:38 UTC

[GitHub] [servicecomb-java-chassis] qubo11 opened a new issue #2581: InvocationTimeout优化

qubo11 opened a new issue #2581:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2581


   InvocationTimeoutBootListener类中,对于业务执行前后的Event事件类是否可以统一?
   ![image](https://user-images.githubusercontent.com/4074496/133545468-35b6b56d-0000-4874-95d0-c4c15a5baaa1.png)
   目前开始事件是InvocationBusinessMethodStartEvent,结束事件是InvocationBusinessFinishEvent
   ![image](https://user-images.githubusercontent.com/4074496/133545614-d9a0b689-c869-4c40-a3a6-4c4c5f43a173.png)
   在业务方法试行完成,发送EventBus事件的时候,onBusinessMethodFinish/onBusinessFinish都会发送。
   是否InvocationBusinessMethodStartEvent和InvocationBusinessMethodFinishEvent成对出现好理解一些?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] qubo11 commented on issue #2581: InvocationTimeout优化

Posted by GitBox <gi...@apache.org>.
qubo11 commented on issue #2581:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2581#issuecomment-920624483


   不是这个意思哈。
   ![image](https://user-images.githubusercontent.com/4074496/133562972-d50e352a-73c5-4391-aae8-dba3273672e2.png)
   和异步没有关系,同步也是这样。
   
   我的意思是,invocation.onBusinessMethodStart();发布了InvocationBusinessMethodStartEvent事件,然后InvocationTimeoutBootListener类中对这个事件处理了。invocation.onBusinessMethodFinish();发布了InvocationBusinessMethodFinishEvent事件,但是InvocationTimeoutBootListener类中处理的是invocation.onBusinessFinish();这个方法发布的事件:
   ![image](https://user-images.githubusercontent.com/4074496/133563306-b68a8972-ea77-4ec1-967d-5d9ae707289a.png)
   我看代码的时候就比较疑惑,为啥InvocationTimeoutBootListener不是处理InvocationBusinessMethodFinishEvent事件而是InvocationBusinessFinishEvent事件。
   
   我和宝哥说了下,他说可以优化一下。
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] wujimin edited a comment on issue #2581: InvocationTimeout优化

Posted by GitBox <gi...@apache.org>.
wujimin edited a comment on issue #2581:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2581#issuecomment-920610981


   这是为了支持异步场景  
   
   method start / method finish只表示controller方法执行的开始与结束
   对于异步场景,方法结束不等于业务逻辑结束,到了business finished才是业务逻辑结束
   
   每个事件的发布都是有成本的,应该不要发布不必要的事件


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2581: InvocationTimeout优化

Posted by GitBox <gi...@apache.org>.
wujimin commented on issue #2581:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2581#issuecomment-920610981


   这是为了支持异步场景  
   
   method start / method finish只表示controller方法执行的开始与结束
   对于异步场景方法结束不等于业务逻辑结束,到了business finished才是业务逻辑结束
   
   每个事件的发布都是有成本的,应该不要发布不必要的事件


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2581: InvocationTimeout优化

Posted by GitBox <gi...@apache.org>.
wujimin commented on issue #2581:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2581#issuecomment-920629387


   InvocationBusinessMethodFinishEvent仅仅表示controller方法执行完成
   InvocationBusinessFinishEvent表示controller逻辑完成
   
   对于同步:方法完成,就是逻辑完成
   对于异步:方法完成,不等于逻辑完成,且方法完成是很快的(慢就是bug)
   
   所以,统一在InvocationBusinessFinishEvent处理


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org