apache / apache/servicecomb-java-chassis

getWaitTime in SyncResponseExecutor doen't consider retry times

オープン
#3,273 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.9k
フォーク
814
平均マージ
8日 23時間
マージ済み PR(30日)
1

説明

version:2.6.0
code:getWaitTime in SyncResponseExecutor
```
private long getWaitTime(Invocation invocation) {
if (invocation.getOperationMeta().getConfig().getMsRequestTimeout() <= 0) {
return invocation.getOperationMeta().getConfig().getMsInvocationTimeout();
}
if (invocation.getOperationMeta().getConfig().getMsInvocationTimeout() <= 0) {
return invocation.getOperationMeta().getConfig().getMsRequestTimeout();
}
return Math.min(invocation.getOperationMeta().getConfig().getMsRequestTimeout(),
invocation.getOperationMeta().getConfig().getMsInvocationTimeout());
}
```
issue:The method getWaitTime in SyncResponseExecutor doen't consider retry times. This result in client request will be finished before the request really timeout. For example,consumer c invokes method m of provider p.The request timeout is 30s,and retryOnNext is 2.The request timeout really is 90s,but getWaitTime will return 30s.So,client invocation will timeout before response return.Baddly,the cmd in SyncResponseExecutor will be null,because the invocation will finish in advance.This result in handlers will not be executed in response callBack.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず SyncResponseExecutor の getWaitTime を調査し、retryOnNext と request および invocation のタイムアウトがどのように設定され、使用されているかを追跡します。30 秒の request タイムアウトで 2 回 retry した場合の動作を確認し、invocation が retry ウィンドウ全体にわたってアクティブなままで、response handlers も引き続き実行される場合に、問題が解決したと判断します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend-api-design, distributed-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。