lazyclient_request_with_warning set to true generates a large number of warn logs
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.6+
* Operating System version: osx 11.2.3
* Java version: 1.8
### Steps to reproduce this issue
1. start provider
2. config consumer lazyclient_request_with_warning=false
3. start consumer
3. stop provider & stop provider
4. consumer call provider method more then 5000 times
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
no lazyclient_request_with_warning logs
### Actual Result
What actually happens?
lazyclient_request_with_warning=false is replaced by :
private void replaceWithLazyClient() {
// this is a defensive operation to avoid client is closed by accident, the initial state of the client is false
URL lazyUrl = url.addParameter(LAZY_CONNECT_INITIAL_STATE_KEY, Boolean.TRUE)
//.addParameter(RECONNECT_KEY, Boolean.FALSE)
.addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString())
.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true);
/**
* the order of judgment in the if statement cannot be changed.
*/
if (!(client instanceof LazyConnectExchangeClient) || client.isClosed()) {
client = new LazyConnectExchangeClient(lazyUrl, client.getExchangeHandler());
}
}
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
Contributor guide
Assessment
This issue has not been assessed yet.