loserwang1024 commented on issue #1765:
URL: https://github.com/apache/fluss/issues/1765#issuecomment-3344732586
There is no lock in
org.apache.fluss.rpc.netty.client.ServerConnection.ResponseCallback#onRequestResult
```java
@Override
public void onRequestResult(int requestId, ApiMessage response) {
InflightRequest request = inflightRequests.remove(requestId);
if (request != null && !request.responseFuture.isDone()) {
connectionMetricGroup.updateMetricsAfterGetResponse(
ApiKeys.forId(request.apiKey),
request.requestStartTime,
response.totalSize());
request.responseFuture.complete(response);
}
}
```
That mean it will be conflicted with
org.apache.fluss.rpc.netty.client.ServerConnection#close(java.lang.Throwable).
Even thougn
org.apache.fluss.rpc.netty.client.ServerConnection#close(java.lang.Throwable)
has lock.
```java
private CompletableFuture<Void> close(Throwable cause) {
synchronized (lock) {
// notify all the inflight requests
for (int requestId : inflightRequests.keySet()) {
InflightRequest request = inflightRequests.remove(requestId);
request.responseFuture.completeExceptionally(requestCause);
}
}
```
--
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]