apache / apache/servicecomb-java-chassis
getWaitTime in SyncResponseExecutor doen't consider retry times
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.