sd4324530 commented on issue #2086:
URL: https://github.com/apache/fluss/issues/2086#issuecomment-3606908140
@swuferhong I think the reason is that the connection wasn't initialized
properly when the request was sent. I believe there are two possible
explanations:
1. When creating a new connection, it can only be used after initialization
is complete,like this:
```
bootstrap
.connect(node.host(), node.port())
.addListener(future -> establishConnection((ChannelFuture)
future, isInnerClient))
//wait connection init finish
.sync();
```
2. When send a request, check if the connection is available. If not, either
wait or fail immediately, like this:
```
if (!state.isReady()) {
//wait or fail immediately.
}
return doSend(apikey, request, new CompletableFuture<>(), false);
```
The changes are all here:`org.apache.fluss.rpc.netty.client.ServerConnection`
What do you think?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]